summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-14 15:04:18 +0000
committerChris Lattner <sabre@nondot.org>2009-10-14 15:04:18 +0000
commita3d4f16b12e29ae5210eb77bb80a617a889a4038 (patch)
tree8ca40e56c79fa6e00c9a8a9994c1771a27ba0102
parent7eb5d377d7bc0c3a786563bcdb22e2edbd8565ed (diff)
downloadbcm5719-llvm-a3d4f16b12e29ae5210eb77bb80a617a889a4038.tar.gz
bcm5719-llvm-a3d4f16b12e29ae5210eb77bb80a617a889a4038.zip
Teach Lexer::MeasureTokenLength to be able to measure the
length of comment tokens. Patch by Abramo Bagnara! llvm-svn: 84100
-rw-r--r--clang/lib/Lex/Lexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 0f01155a8f2..c8b9a5d5420 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -238,6 +238,7 @@ unsigned Lexer::MeasureTokenLength(SourceLocation Loc,
// 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();
OpenPOWER on IntegriCloud