[cfe-commits] r57398 - /cfe/trunk/lib/Lex/Lexer.cpp
Chris Lattner
sabre at nondot.org
Sat Oct 11 20:27:20 PDT 2008
Author: lattner
Date: Sat Oct 11 22:27:19 2008
New Revision: 57398
URL: http://llvm.org/viewvc/llvm-project?rev=57398&view=rev
Log:
Fix a couple more places that poke KeepCommentMode unnecesarily.
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=57398&r1=57397&r2=57398&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Sat Oct 11 22:27:19 2008
@@ -100,7 +100,8 @@
LexingRawMode = false;
// Default to keeping comments if requested.
- KeepCommentMode = PP->getCommentRetentionState();
+ KeepCommentMode = false;
+ SetCommentRetentionState(PP->getCommentRetentionState());
}
/// Lexer constructor - Create a new raw lexer object. This object is only
@@ -1117,7 +1118,7 @@
FormTokenWithChars(Result, CurPtr);
// Restore comment saving mode, in case it was disabled for directive.
- KeepCommentMode = PP->getCommentRetentionState();
+ SetCommentRetentionState(PP->getCommentRetentionState());
return true; // Have a token.
}
@@ -1236,7 +1237,7 @@
ParsingPreprocessorDirective = false;
// Restore comment saving mode, in case it was disabled for directive.
- KeepCommentMode = PP->getCommentRetentionState();
+ SetCommentRetentionState(PP->getCommentRetentionState());
// Since we consumed a newline, we are back at the start of a line.
IsAtStartOfLine = true;
More information about the cfe-commits
mailing list