blob: ff8afc3e47ac9816db76a35bfa591a083407659b [file] [log] [blame]
Chris Lattnerca515cc2009-04-21 23:28:41 +00001// RUN: clang-cc -E %s -o %t &&
Chris Lattner341c9a12006-07-28 06:54:07 +00002// This should print as ".. ." to avoid turning into ...
Chris Lattnerca515cc2009-04-21 23:28:41 +00003// RUN: grep -F 'A: . . .' %t &&
Chris Lattner341c9a12006-07-28 06:54:07 +00004#define y(a) ..a
Chris Lattnerca515cc2009-04-21 23:28:41 +00005A: y(.)
Chris Lattner341c9a12006-07-28 06:54:07 +00006
Chris Lattnerca515cc2009-04-21 23:28:41 +00007// RUN: grep -F 'C: .. .' %t &&
8#define DOT .
9C: ..DOT
10
11
12// RUN: grep -F 'D: + + - - + + = = =' %t &&
Chris Lattner341c9a12006-07-28 06:54:07 +000013#define PLUS +
14#define EMPTY
15#define f(x) =x=
Chris Lattnerca515cc2009-04-21 23:28:41 +000016D: +PLUS -EMPTY- PLUS+ f(=)
Chris Lattner341c9a12006-07-28 06:54:07 +000017
Chris Lattnerca515cc2009-04-21 23:28:41 +000018// RUN: grep -F 'E: L "str"' %t
Chris Lattner15346fa2008-01-15 05:22:14 +000019
20// Should expand to L "str" not L"str"
21#define test(x) L#x
Chris Lattnerca515cc2009-04-21 23:28:41 +000022E: test(str)
Chris Lattner15346fa2008-01-15 05:22:14 +000023