summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-25 01:03:03 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-25 01:03:03 +0000
commitd6111d3c6d214e5049b731ed4b13c1847034211a (patch)
treeccf8ec17a45dec0adf2054e32ba442ede87f3650 /clang/lib/Basic/SourceManager.cpp
parente24b8721888b10f841a4151be5d105d02931492d (diff)
downloadbcm5719-llvm-d6111d3c6d214e5049b731ed4b13c1847034211a.tar.gz
bcm5719-llvm-d6111d3c6d214e5049b731ed4b13c1847034211a.zip
Make isBeforeInTranslationUnit consistent in the face of failures to get a valid FileID (V2).
llvm-svn: 182698
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index dfd2a1baf4e..0de5129a358 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud