diff options
Diffstat (limited to 'clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | clang/lib/Lex/PreprocessingRecord.cpp | 6 |
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); } |