diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-20 23:27:33 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-20 23:27:33 +0000 |
commit | 2502efd26196d5bbc1f320181aea765d469309b4 (patch) | |
tree | 07206475a46911f7151a64bd7fa311f5a600511e /lib/Lex/PreprocessingRecord.cpp | |
parent | ef70724e66d8ede0edbe260fbcdd9781688bb1fd (diff) |
[libclang] When pointing at a macro expansion inside a macro argument,
return a cursor for the inner macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 2368b38981..3f288b0fd9 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/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); } |