summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceManager.cpp
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
commit2403797eecef43c4e3fb620684eba8d18ed8d087 (patch)
treed81b90f5a55fe454ee6fa14c5950e444d1679ca3 /clang/lib/Basic/SourceManager.cpp
parent596b7cbc19f0426f52b641079d5d4a476e9f6330 (diff)
downloadbcm5719-llvm-2403797eecef43c4e3fb620684eba8d18ed8d087.tar.gz
bcm5719-llvm-2403797eecef43c4e3fb620684eba8d18ed8d087.zip
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. llvm-svn: 147056
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 310b68eaeb5..b278f3d9634 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud