[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / output_paste_avoid.cpp
blob689d966e867a0673847bf45c219e256b4c574948
1 // RUN: %clang_cc1 -E -std=c++11 %s -o - | FileCheck -strict-whitespace %s
4 #define y(a) ..a
5 A: y(.)
6 // This should print as ".. ." to avoid turning into ...
7 // CHECK: A: .. .
9 #define X 0 .. 1
10 B: X
11 // CHECK: B: 0 .. 1
13 #define DOT .
14 C: ..DOT
15 // CHECK: C: .. .
18 #define PLUS +
19 #define EMPTY
20 #define f(x) =x=
21 D: +PLUS -EMPTY- PLUS+ f(=)
22 // CHECK: D: + + - - + + = = =
25 #define test(x) L#x
26 E: test(str)
27 // Should expand to L "str" not L"str"
28 // CHECK: E: L "str"
30 // Should avoid producing >>=.
31 #define equal =
32 F: >>equal
33 // CHECK: F: >> =
35 // Make sure we don't introduce spaces in the guid because we try to avoid
36 // pasting '-' to a numeric constant.
37 #define TYPEDEF(guid) typedef [uuid(guid)]
38 TYPEDEF(66504301-BE0F-101A-8BBB-00AA00300CAB) long OLE_COLOR;
39 // CHECK: typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB)] long OLE_COLOR;
41 // Be careful with UD-suffixes.
42 #define StrSuffix() "abc"_suffix
43 #define IntSuffix() 123_suffix
44 UD: StrSuffix()ident
45 UD: IntSuffix()ident
46 // CHECK: UD: "abc"_suffix ident
47 // CHECK: UD: 123_suffix ident