blob: de758f179a41ff42bf136d1f6ba364ba61dc4906 [file] [log] [blame]
Jordan Rosefc120602013-01-24 20:50:50 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Jordan Rose74c24982013-01-30 01:52:57 +00002// RUN: %clang_cc1 -E -DPP_ONLY=1 %s -o %t
3// RUN: FileCheck --strict-whitespace --input-file=%t %s
Jordan Rosefc120602013-01-24 20:50:50 +00004
5// This file contains Unicode characters; please do not "fix" them!
6
7extern int x; // expected-warning {{treating Unicode character as whitespace}}
8extern int x; // expected-warning {{treating Unicode character as whitespace}}
Jordan Rose74c24982013-01-30 01:52:57 +00009
10// CHECK: extern int {{x}}
11// CHECK: extern int {{x}}
12
Jordan Rose0ed43942013-01-31 19:48:48 +000013#pragma mark ¡Unicode!
14
15#define COPYRIGHT Copyright © 2012
16#define XSTR(X) #X
17#define STR(X) XSTR(X)
18
19static const char *copyright = STR(COPYRIGHT); // no-warning
20// CHECK: static const char *copyright = "Copyright © {{2012}}";
21
Jordan Rose74c24982013-01-30 01:52:57 +000022#if PP_ONLY
Jordan Rose0ed43942013-01-31 19:48:48 +000023COPYRIGHT
24// CHECK: Copyright © {{2012}}
Jordan Rose74c24982013-01-30 01:52:57 +000025CHECK: The preprocessor should not complain about Unicode characters like ©.
26#endif