48 lines · cpp
1// RUN: %clang_cc1 -E -std=c++11 %s -o - | FileCheck -strict-whitespace %s2 3 4#define y(a) ..a5A: y(.)6// This should print as ".. ." to avoid turning into ...7// CHECK: A: .. .8 9#define X 0 .. 110B: X11// CHECK: B: 0 .. 112 13#define DOT .14C: ..DOT15// CHECK: C: .. .16 17 18#define PLUS +19#define EMPTY20#define f(x) =x=21D: +PLUS -EMPTY- PLUS+ f(=)22// CHECK: D: + + - - + + = = =23 24 25#define test(x) L#x26E: test(str)27// Should expand to L "str" not L"str"28// CHECK: E: L "str"29 30// Should avoid producing >>=.31#define equal =32F: >>equal33// CHECK: F: >> =34 35// Make sure we don't introduce spaces in the guid because we try to avoid36// pasting '-' to a numeric constant.37#define TYPEDEF(guid) typedef [uuid(guid)]38TYPEDEF(66504301-BE0F-101A-8BBB-00AA00300CAB) long OLE_COLOR;39// CHECK: typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB)] long OLE_COLOR;40 41// Be careful with UD-suffixes.42#define StrSuffix() "abc"_suffix43#define IntSuffix() 123_suffix44UD: StrSuffix()ident45UD: IntSuffix()ident46// CHECK: UD: "abc"_suffix ident47// CHECK: UD: 123_suffix ident48