diff options
| author | David Blaikie <dblaikie@gmail.com> | 2012-06-15 00:47:13 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2012-06-15 00:47:13 +0000 |
| commit | 2af2b3071dbb0c608de99e1163338cd5b1e8e497 (patch) | |
| tree | 7dba9d6e0178e225c7c15249a76b56ec95e2606a /clang | |
| parent | 1d1fa72837c471d18974dc3d68db2e5371290091 (diff) | |
| download | bcm5719-llvm-2af2b3071dbb0c608de99e1163338cd5b1e8e497.tar.gz bcm5719-llvm-2af2b3071dbb0c608de99e1163338cd5b1e8e497.zip | |
Fix PR13065.
This condition (added in r158093) was overly conservative.
llvm-svn: 158483
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Lex/Lexer.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Preprocessor/comment_save.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 9662f9d9097..208951faf38 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -2631,7 +2631,7 @@ LexNextToken: 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. diff --git a/clang/test/Preprocessor/comment_save.c b/clang/test/Preprocessor/comment_save.c index b86004272b2..996c14ca976 100644 --- a/clang/test/Preprocessor/comment_save.c +++ b/clang/test/Preprocessor/comment_save.c @@ -6,3 +6,7 @@ /* bar */ // CHECK: /* bar */ +#if FOO +#endif +/* baz */ +// CHECK: /* baz */ |

