Pārlūkot izejas kodu

Make isBeforeInTranslationUnit consistent in the face of failures to get a valid FileID (V2).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182698 91177308-0d34-0410-b5e6-96231b3b80d8
Argyrios Kyrtzidis 12 gadi atpakaļ
vecāks
revīzija
45e1f0e3e7
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/Basic/SourceManager.cpp

+ 1 - 1
lib/Basic/SourceManager.cpp

@@ -2043,7 +2043,7 @@ bool SourceManager::isBeforeInTranslationUnit(SourceLocation LHS,
   // is a serialized one referring to a file that was removed after we loaded
   // the PCH.
   if (LOffs.first.isInvalid() || ROffs.first.isInvalid())
-    return LOffs.first.isInvalid();
+    return LOffs.first.isInvalid() && !ROffs.first.isInvalid();
 
   // If the source locations are in the same file, just compare offsets.
   if (LOffs.first == ROffs.first)