[cfe-dev] Assert in lexer
John Graley
john.graley at ntlworld.com
Sun Jan 4 12:22:29 PST 2009
A little more info:
AnnotatePreviousCachedTokens() is called from AnnotateCachedTokens() which is called from TryAnnotateTypeOrScopeToken() in the last clause (dealing with C++ scope followed by non-typename).
AnnotatePreviousCachedTokens() requires the range of the supplied annotation token to end at the last pasrsed token. This range is being set from the source range of the C++ scope.
----- Original Message -----
From: John Graley
To: cfe-dev at cs.uiuc.edu
Sent: Sunday, January 04, 2009 7:38 PM
Subject: [cfe-dev] Assert in lexer
Hi All
I'm using clang as a parser for another project (ie I have my own Actions implementation) and I get an assert failure on the following code:
int a;
int main()
{
return ::a;
}
The assertion text reads:
assertion "CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token"" failed: file "PPCaching.cpp", line 95
Does anyone know what this is? Also, can I turn off caching of tokens if I'm not worried about speed?
Cheers, John
------------------------------------------------------------------------------
_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090104/03b03699/attachment.html>
More information about the cfe-dev
mailing list