[cfe-commits] r84100 - /cfe/trunk/lib/Lex/Lexer.cpp
Chris Lattner
sabre at nondot.org
Wed Oct 14 08:04:18 PDT 2009
Author: lattner
Date: Wed Oct 14 10:04:18 2009
New Revision: 84100
URL: http://llvm.org/viewvc/llvm-project?rev=84100&view=rev
Log:
Teach Lexer::MeasureTokenLength to be able to measure the
length of comment tokens. Patch by Abramo Bagnara!
Modified:
cfe/trunk/lib/Lex/Lexer.cpp
Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=84100&r1=84099&r2=84100&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Wed Oct 14 10:04:18 2009
@@ -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();
More information about the cfe-commits
mailing list