summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PreprocessingRecord.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-20 23:27:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-20 23:27:33 +0000
commit45e8cf573219434ffd1e45d0a1a9b9cbb854d522 (patch)
tree904ce72c01c7f2792d87c3d7a10885ec238c893c /clang/lib/Lex/PreprocessingRecord.cpp
parentd70da081609ff3cd4a9150b42e095fc42bdec33d (diff)
downloadbcm5719-llvm-45e8cf573219434ffd1e45d0a1a9b9cbb854d522.tar.gz
bcm5719-llvm-45e8cf573219434ffd1e45d0a1a9b9cbb854d522.zip
[libclang] When pointing at a macro expansion inside a macro argument,
return a cursor for the inner macro. llvm-svn: 140207
Diffstat (limited to 'clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--clang/lib/Lex/PreprocessingRecord.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp
index 2368b389810..3f288b0fd9f 100644
--- a/clang/lib/Lex/PreprocessingRecord.cpp
+++ b/clang/lib/Lex/PreprocessingRecord.cpp
@@ -145,10 +145,10 @@ unsigned PreprocessingRecord::findEndLocalPreprocessedEntity(
}
void PreprocessingRecord::addPreprocessedEntity(PreprocessedEntity *Entity) {
- SourceLocation Loc = Entity->getSourceRange().getBegin();
+ assert(Entity);
assert((PreprocessedEntities.empty() ||
- !SourceMgr.isBeforeInTranslationUnit(Loc,
- PreprocessedEntities.back()->getSourceRange().getEnd())) &&
+ !SourceMgr.isBeforeInTranslationUnit(Entity->getSourceRange().getBegin(),
+ PreprocessedEntities.back()->getSourceRange().getBegin())) &&
"Adding a preprocessed entity that is before the previous one in TU");
PreprocessedEntities.push_back(Entity);
}
OpenPOWER on IntegriCloud