Jordan Rose | fc12060 | 2013-01-24 20:50:50 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Jordan Rose | 74c2498 | 2013-01-30 01:52:57 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -E -DPP_ONLY=1 %s -o %t |
| 3 | // RUN: FileCheck --strict-whitespace --input-file=%t %s |
Jordan Rose | fc12060 | 2013-01-24 20:50:50 +0000 | [diff] [blame] | 4 | |
| 5 | // This file contains Unicode characters; please do not "fix" them! |
| 6 | |
| 7 | extern int x; // expected-warning {{treating Unicode character as whitespace}} |
| 8 | extern int x; // expected-warning {{treating Unicode character as whitespace}} |
Jordan Rose | 74c2498 | 2013-01-30 01:52:57 +0000 | [diff] [blame] | 9 | |
| 10 | // CHECK: extern int {{x}} |
| 11 | // CHECK: extern int {{x}} |
| 12 | |
Jordan Rose | 0ed4394 | 2013-01-31 19:48:48 +0000 | [diff] [blame] | 13 | #pragma mark ¡Unicode! |
| 14 | |
| 15 | #define COPYRIGHT Copyright © 2012 |
| 16 | #define XSTR(X) #X |
| 17 | #define STR(X) XSTR(X) |
| 18 | |
| 19 | static const char *copyright = STR(COPYRIGHT); // no-warning |
| 20 | // CHECK: static const char *copyright = "Copyright © {{2012}}"; |
| 21 | |
Jordan Rose | 74c2498 | 2013-01-30 01:52:57 +0000 | [diff] [blame] | 22 | #if PP_ONLY |
Jordan Rose | 0ed4394 | 2013-01-31 19:48:48 +0000 | [diff] [blame] | 23 | COPYRIGHT |
| 24 | // CHECK: Copyright © {{2012}} |
Jordan Rose | 74c2498 | 2013-01-30 01:52:57 +0000 | [diff] [blame] | 25 | CHECK: The preprocessor should not complain about Unicode characters like ©. |
| 26 | #endif |