[PATCH] Don't warn about Unicode characters in -E mode

Richard Smith richard at metafoo.co.uk
Tue Jan 29 14:53:40 PST 2013


  Yes, this makes sense to me -- so if people split their preprocessing and compilation steps (say, for a ccache build), they'll only get the errors from the second stage.


================
Comment at: lib/Lex/Lexer.cpp:2836
@@ -2836,1 +2835,3 @@
+  if (!isASCII(*BufferPtr) && !isAllowedIDChar(C) &&
+      (isLexingRawMode() || !PP->isPreprocessedOutput())) {
     // Non-ASCII characters tend to creep into source code unintentionally.
----------------
Do you need the isLexingRawMode() check here? I guess it doesn't matter if we drop the non-ASCII characters in that case?


http://llvm-reviews.chandlerc.com/D346



More information about the cfe-commits mailing list