blob: afdcdbd493f04749879643a6649a35440e6e9fc0 [file] [log] [blame]
Rafael Espindola96e78132013-07-04 16:16:58 +00001// RUN: not %clang_cc1 -P -E -fms-extensions %s | FileCheck -strict-whitespace %s
Chris Lattner920bf452010-07-17 16:24:30 +00002
Chris Lattner3f1cc832008-02-07 06:03:59 +00003// This horrible stuff should preprocess into (other than whitespace):
4// int foo;
5// int bar;
6// int baz;
7
8int foo;
9
Edward O'Callaghanb396a372009-10-27 02:36:32 +000010// CHECK: int foo;
11
Chris Lattner3f1cc832008-02-07 06:03:59 +000012#define comment /##/ dead tokens live here
13comment This is stupidity
14
15int bar;
16
Edward O'Callaghanb396a372009-10-27 02:36:32 +000017// CHECK: int bar;
18
Chris Lattner3f1cc832008-02-07 06:03:59 +000019#define nested(x) int x comment cute little dead tokens...
20
21nested(baz) rise of the dead tokens
22
23;
24
Edward O'Callaghanb396a372009-10-27 02:36:32 +000025// CHECK: int baz
26// CHECK: ;
27
Chris Lattner920bf452010-07-17 16:24:30 +000028
29// rdar://8197149 - VC++ allows invalid token pastes: (##baz
30#define foo(x) abc(x)
31#define bar(y) foo(##baz(y))
32bar(q)
33
34// CHECK: abc(baz(q))