blob: 7a2830b3240d9f34423f5f472dd4efbd68d295e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// RUN: clang-cc -x assembler-with-cpp -E %s > %t &&
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
#endif
// Invalid token pasting is ok.
// RUN: grep '1: X .' %t &&
#define A X ## .
1: A
// Line markers are not linemarkers in .S files, they are passed through.
// RUN: grep '# 321' %t &&
# 321
// Unknown directives are passed through.
// RUN: grep '# B C' %t &&
# B C
// Unknown directives are expanded.
// RUN: grep '# BAR42' %t &&
#define D(x) BAR ## x
# D(42)
// Unmatched quotes are permitted.
// RUN: grep "2: '" %t &&
// RUN: grep '3: "' %t &&
2: '
3: "
// Empty char literals are ok.
// RUN: grep "4: ''" %t &&
4: ''
// Portions of invalid pasting should still expand as macros.
// rdar://6709206
// RUN: grep "5: expanded (" %t &&
#define M4 expanded
#define M5() M4 ## (
5: M5()
// RUN: true
|