Home | History | Annotate | Download | only in Lexer
      1 // RUN: %clang_cc1 -fsyntax-only -verify -x c -std=c11 %s
      2 // RUN: %clang_cc1 -fsyntax-only -verify -x c++ -std=c++11 %s
      3 // RUN: %clang_cc1 -E -DPP_ONLY=1 %s -o %t
      4 // RUN: FileCheck --strict-whitespace --input-file=%t %s
      5 
      6 // This file contains Unicode characters; please do not "fix" them!
      7 
      8 extern intx; // expected-warning {{treating Unicode character as whitespace}}
      9 extern intx; // expected-warning {{treating Unicode character as whitespace}}
     10 
     11 // CHECK: extern int{{x}}
     12 // CHECK: extern int{{x}}
     13 
     14 #pragma mark Unicode!
     15 
     16 #define COPYRIGHT Copyright  2012
     17 #define XSTR(X) #X
     18 #define STR(X) XSTR(X)
     19 
     20 static const char *copyright = STR(COPYRIGHT); // no-warning
     21 // CHECK: static const char *copyright = "Copyright  {{2012}}";
     22 
     23 #if PP_ONLY
     24 COPYRIGHT
     25 // CHECK: Copyright  {{2012}}
     26 CHECK: The preprocessor should not complain about Unicode characters like .
     27 #endif
     28 
     29 // A  by any other name....
     30 extern int ;
     31 int (int ) { return + 1; }
     32 int main () {
     33   int  = ();
     34   return ;
     35 }
     36