diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:29 +0000 |
commit | d7711ec430fde5706f85ba6c4b85283a8e743ff7 (patch) | |
tree | d4c9d96c8bc778dd746b922803dcdef41f18c074 /lib/Basic/SourceManager.cpp | |
parent | 87dd4f7f43593d86add23faab58e7393aaa2219f (diff) | |
download | clang-d7711ec430fde5706f85ba6c4b85283a8e743ff7.tar.gz |
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 'lib/Basic/SourceManager.cpp')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 310b68eaeb..b278f3d963 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -1665,7 +1665,7 @@ static bool MoveUpIncludeHierarchy(std::pair<FileID, unsigned> &Loc, SourceLocation UpperLoc; const SrcMgr::SLocEntry &Entry = SM.getSLocEntry(Loc.first); if (Entry.isExpansion()) - UpperLoc = Entry.getExpansion().getExpansionLocEnd(); + UpperLoc = Entry.getExpansion().getExpansionLocStart(); else UpperLoc = Entry.getFile().getIncludeLoc(); |