blob: 200ced9fba7a2e8bb1ab58862496788b0900a7f4 [file] [log] [blame]
Nuno Lopes0e86b862009-10-27 10:09:29 +00001// RUN: clang-cc -E %s -o - | FileCheck -strict-whitespace %s
Edward O'Callaghanf78edf52009-10-27 02:36:32 +00002
3
Chris Lattner341c9a12006-07-28 06:54:07 +00004#define y(a) ..a
Chris Lattnerca515cc2009-04-21 23:28:41 +00005A: y(.)
Edward O'Callaghanf78edf52009-10-27 02:36:32 +00006// This should print as ".. ." to avoid turning into ...
7// CHECK: A: . . .
Chris Lattner341c9a12006-07-28 06:54:07 +00008
Edward O'Callaghanf78edf52009-10-27 02:36:32 +00009
Chris Lattnerca515cc2009-04-21 23:28:41 +000010#define DOT .
11C: ..DOT
Edward O'Callaghanf78edf52009-10-27 02:36:32 +000012// CHECK: C: .. .
Chris Lattnerca515cc2009-04-21 23:28:41 +000013
14
Chris Lattner341c9a12006-07-28 06:54:07 +000015#define PLUS +
16#define EMPTY
17#define f(x) =x=
Chris Lattnerca515cc2009-04-21 23:28:41 +000018D: +PLUS -EMPTY- PLUS+ f(=)
Edward O'Callaghanf78edf52009-10-27 02:36:32 +000019// CHECK: D: + + - - + + = = =
Chris Lattner341c9a12006-07-28 06:54:07 +000020
Chris Lattner15346fa2008-01-15 05:22:14 +000021
Chris Lattner15346fa2008-01-15 05:22:14 +000022#define test(x) L#x
Chris Lattnerca515cc2009-04-21 23:28:41 +000023E: test(str)
Edward O'Callaghanf78edf52009-10-27 02:36:32 +000024// Should expand to L "str" not L"str"
25// CHECK: E: L "str"
Chris Lattner15346fa2008-01-15 05:22:14 +000026