diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-02-08 19:35:18 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-02-08 19:35:18 +0000 |
commit | 39d67117f896c6e2faa727671ef64b3c04b0e3fe (patch) | |
tree | f4b36f79c196936db5b10bfaf1b65090ad3252ae /lib/Lex/PPCaching.cpp | |
parent | 4c72d3ec68b88868a75b3e6bbe5520dcefe86a95 (diff) |
When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPCaching.cpp')
-rw-r--r-- | lib/Lex/PPCaching.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPCaching.cpp b/lib/Lex/PPCaching.cpp index 7c3780ffc0..6aeb6fa3a2 100644 --- a/lib/Lex/PPCaching.cpp +++ b/lib/Lex/PPCaching.cpp @@ -91,7 +91,7 @@ const Token &Preprocessor::PeekAhead(unsigned N) { void Preprocessor::AnnotatePreviousCachedTokens(const Token &Tok) { assert(Tok.isAnnotation() && "Expected annotation token"); assert(CachedLexPos != 0 && "Expected to have some cached tokens"); - assert(CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() + assert(CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token"); // Start from the end of the cached tokens list and look for the token |