return LexIdentifier(Result, CurPtr);
}
- if (!isLexingRawMode() && !PP->isPreprocessedOutput() &&
+ if (!isLexingRawMode() && !ParsingPreprocessorDirective &&
+ !PP->isPreprocessedOutput() &&
!isASCII(*BufferPtr) && !isAllowedIDChar(C)) {
// Non-ASCII characters tend to creep into source code unintentionally.
// Instead of letting the parser complain about the unknown token,
if (Status == conversionOK)
return LexUnicode(Result, CodePoint, CurPtr);
- if (isLexingRawMode() || PP->isPreprocessedOutput()) {
+ if (isLexingRawMode() || ParsingPreprocessorDirective ||
+ PP->isPreprocessedOutput()) {
++CurPtr;
Kind = tok::unknown;
break;
// CHECK: extern int {{x}}
// CHECK: extern int {{x}}
+#pragma mark ¡Unicode!
+
+#define COPYRIGHT Copyright © 2012
+#define XSTR(X) #X
+#define STR(X) XSTR(X)
+
+static const char *copyright = STR(COPYRIGHT); // no-warning
+// CHECK: static const char *copyright = "Copyright © {{2012}}";
+
#if PP_ONLY
+COPYRIGHT
+// CHECK: Copyright © {{2012}}
CHECK: The preprocessor should not complain about Unicode characters like ©.
#endif