[cfe-dev] MeasureTokenLength does not works properly for comment tokens

Chris Lattner clattner at apple.com
Wed Oct 14 08:04:30 PDT 2009


Thanks, applied in r84100!

On Oct 14, 2009, at 2:56 AM, Abramo Bagnara wrote:

>
> I attach the trivial patch.
> Index: lib/Lex/Lexer.cpp
> ===================================================================
> --- lib/Lex/Lexer.cpp	(revisione 84081)
> +++ lib/Lex/Lexer.cpp	(copia locale)
> @@ -238,6 +238,7 @@
>
>   // Create a lexer starting at the beginning of this token.
>   Lexer TheLexer(Loc, LangOpts, Buffer.first, StrData, Buffer.second);
> +  TheLexer.SetCommentRetentionState(true);
>   Token TheTok;
>   TheLexer.LexFromRawLexer(TheTok);
>   return TheTok.getLength();
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list