diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-11-21 06:17:10 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-11-21 06:17:10 +0000 |
| commit | b352e3edb559020e904d52941b039c5cebb26056 (patch) | |
| tree | 595e816cc4b447fda5ffc218aa68d3413bf3db00 /clang/Lex/Lexer.cpp | |
| parent | ad7cdd37b3f99a4d6ea37a71c46aa76a4d1bde54 (diff) | |
| download | bcm5719-llvm-b352e3edb559020e904d52941b039c5cebb26056.tar.gz bcm5719-llvm-b352e3edb559020e904d52941b039c5cebb26056.zip | |
Change KeepComments/KeepMacroComments modes to be facets of the preprocessor
state, not aspects of the language standard being parsed.
llvm-svn: 39209
Diffstat (limited to 'clang/Lex/Lexer.cpp')
| -rw-r--r-- | clang/Lex/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp index 3ae7b6a4e51..4a57ac2c74b 100644 --- a/clang/Lex/Lexer.cpp +++ b/clang/Lex/Lexer.cpp @@ -67,7 +67,7 @@ Lexer::Lexer(const SourceBuffer *File, unsigned fileid, Preprocessor &pp, LexingRawMode = false; // Default to keeping comments if requested. - KeepCommentMode = Features.KeepComments; + KeepCommentMode = PP.getCommentRetentionState(); } /// Stringify - Convert the specified string into a C string, with surrounding @@ -970,7 +970,7 @@ bool Lexer::LexEndOfFile(LexerToken &Result, const char *CurPtr) { FormTokenWithChars(Result, CurPtr); // Restore comment saving mode, in case it was disabled for directive. - KeepCommentMode = Features.KeepComments; + KeepCommentMode = PP.getCommentRetentionState(); return true; // Have a token. } @@ -1087,7 +1087,7 @@ LexNextToken: ParsingPreprocessorDirective = false; // Restore comment saving mode, in case it was disabled for directive. - KeepCommentMode = Features.KeepComments; + KeepCommentMode = PP.getCommentRetentionState(); // Since we consumed a newline, we are back at the start of a line. IsAtStartOfLine = true; |

