diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-02-24 05:29:33 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-02-24 05:29:33 +0000 |
| commit | 59da739613234ed71b3273ba28a09f79e0adc456 (patch) | |
| tree | 21c2ff034f1c12002783a7e2102700e3bf786963 /clang/lib | |
| parent | de681d43eb42158d76a217e7ed6f26ad5f946d7e (diff) | |
| download | bcm5719-llvm-59da739613234ed71b3273ba28a09f79e0adc456.tar.gz bcm5719-llvm-59da739613234ed71b3273ba28a09f79e0adc456.zip | |
Fix PR3635 by handling ## magically
llvm-svn: 65374
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Rewrite/HTMLRewrite.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp index cf49701a1d7..0ef998deb13 100644 --- a/clang/lib/Rewrite/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/HTMLRewrite.cpp @@ -437,6 +437,11 @@ void html::HighlightMacros(Rewriter &R, FileID FID, Preprocessor& PP) { // preprocessor directives. if (Tok.is(tok::hash) && Tok.isAtStartOfLine()) continue; + + // If this is a ## token, change its kind to unknown so that repreprocessing + // it will not produce an error. + if (Tok.is(tok::hashhash)) + Tok.setKind(tok::unknown); // If this raw token is an identifier, the raw lexer won't have looked up // the corresponding identifier info for it. Do this now so that it will be |

