diff options
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; |

