[cfe-commits] r158483 - in /cfe/trunk: lib/Lex/Lexer.cpp test/Preprocessor/comment_save.c
David Blaikie
dblaikie at gmail.com
Thu Jun 14 17:47:13 PDT 2012
Author: dblaikie
Date: Thu Jun 14 19:47:13 2012
New Revision: 158483
URL: http://llvm.org/viewvc/llvm-project?rev=158483&view=rev
Log:
Fix PR13065.
This condition (added in r158093) was overly conservative.
Modified:
cfe/trunk/lib/Lex/Lexer.cpp
cfe/trunk/test/Preprocessor/comment_save.c
Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=158483&r1=158482&r2=158483&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Thu Jun 14 19:47:13 2012
@@ -2631,7 +2631,7 @@
ParsingPreprocessorDirective = false;
// Restore comment saving mode, in case it was disabled for directive.
- if (!LexingRawMode)
+ if (PP)
SetCommentRetentionState(PP->getCommentRetentionState());
// Since we consumed a newline, we are back at the start of a line.
Modified: cfe/trunk/test/Preprocessor/comment_save.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/comment_save.c?rev=158483&r1=158482&r2=158483&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/comment_save.c (original)
+++ cfe/trunk/test/Preprocessor/comment_save.c Thu Jun 14 19:47:13 2012
@@ -6,3 +6,7 @@
/* bar */
// CHECK: /* bar */
+#if FOO
+#endif
+/* baz */
+// CHECK: /* baz */
More information about the cfe-commits
mailing list