aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-21 16:56:29 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-21 16:56:29 +0000
commitd7711ec430fde5706f85ba6c4b85283a8e743ff7 (patch)
treed4c9d96c8bc778dd746b922803dcdef41f18c074 /include/clang/Basic/SourceManager.h
parent87dd4f7f43593d86add23faab58e7393aaa2219f (diff)
For SourceManager::isBeforeInTranslationUnit(), have it consider macro arg expanded
token locations as coming before the closing ')' of a function macro expansion. Include a unit test for SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 4193aeee43..4aed17ac13 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -438,8 +438,7 @@ public:
// to determine which came first. This will also take care the case where
// one of the locations points at the inclusion/expansion point of the other
// in which case its FileID will come before the other.
- if (LOffset == ROffset &&
- (LQueryFID != CommonFID || RQueryFID != CommonFID))
+ if (LOffset == ROffset)
return IsLQFIDBeforeRQFID;
return LOffset < ROffset;