<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6001.18183" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>A little more info:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>AnnotatePreviousCachedTokens() is called from
AnnotateCachedTokens() which is called from TryAnnotateTypeOrScopeToken() in the
last clause (dealing with C++ scope followed by non-typename).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=john.graley@ntlworld.com href="mailto:john.graley@ntlworld.com">John
Graley</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=cfe-dev@cs.uiuc.edu
href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, January 04, 2009 7:38
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [cfe-dev] Assert in lexer</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>
<DIV><FONT face=Arial size=2>Hi All</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>int a;</FONT></DIV>
<DIV><FONT face=Arial size=2>int main()<BR>{<BR> return
::a;<BR>}<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>The assertion text reads:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>assertion
"CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc()
&& "The annotation should be until the most recent cached token""
failed: file "PPCaching.cpp", line 95</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Does anyone know what this is? Also, can I turn
off caching of tokens if I'm not worried about speed? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers, John</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>cfe-dev mailing
list<BR>cfe-dev@cs.uiuc.edu<BR>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<BR></BLOCKQUOTE></BODY></HTML>