1 // RUN: %clang_cc1 -x assembler-with-cpp -E %s -o - | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s
4 #error "__ASSEMBLER__ not defined"
8 // Invalid token pasting is ok.
11 // CHECK-Identifiers-False: 1: X .
13 // Line markers are not linemarkers in .S files, they are passed through.
15 // CHECK-Identifiers-False: # 321
17 // Unknown directives are passed through.
19 // CHECK-Identifiers-False: # B C
21 // Unknown directives are expanded.
24 // CHECK-Identifiers-False: # BAR42
26 // Unmatched quotes are permitted.
29 // CHECK-Identifiers-False: 2: '
30 // CHECK-Identifiers-False: 3: "
32 // (balance quotes to keep editors happy): "'
34 // Empty char literals are ok.
36 // CHECK-Identifiers-False: 4: ''
39 // Portions of invalid pasting should still expand as macros.
44 // CHECK-Identifiers-False: 5: expanded (
46 #define FOO(name) name ## $foo
48 // CHECK-Identifiers-False: 6: blarg $foo
50 // RUN: %clang_cc1 -x assembler-with-cpp -fdollars-in-identifiers -E %s -o - | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s
51 #define FOO(name) name ## $foo
53 // CHECK-Identifiers-True: 7: blarg$foo
56 #define T6() T6 #nostring
60 // CHECK-Identifiers-True: 8: T6 #nostring
61 // CHECK-Identifiers-True: 9: T7 "foo"
63 // Concatenation with period doesn't leave a space
64 #define T8(A,B) A ## B
66 // CHECK-Identifiers-True: 10: .T8
68 // This should not crash.
71 // CHECK-Identifiers-True: 11: #0
73 // Universal character names can specify basic ascii and control characters
75 // CHECK-Identifiers-False: 12: \u0020\u0030
77 // This should not crash
79 // CHECK-Identifiers-False: # ##
83 // CHECK-Identifiers-False: # # # 1