2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -P -E -fms-extensions %s | FileCheck -strict-whitespace %s
|
2010-07-18 00:24:30 +08:00
|
|
|
|
2008-02-07 14:03:59 +08:00
|
|
|
// This horrible stuff should preprocess into (other than whitespace):
|
|
|
|
// int foo;
|
|
|
|
// int bar;
|
|
|
|
// int baz;
|
|
|
|
|
|
|
|
int foo;
|
|
|
|
|
2009-10-27 10:36:32 +08:00
|
|
|
// CHECK: int foo;
|
|
|
|
|
2008-02-07 14:03:59 +08:00
|
|
|
#define comment /##/ dead tokens live here
|
|
|
|
comment This is stupidity
|
|
|
|
|
|
|
|
int bar;
|
|
|
|
|
2009-10-27 10:36:32 +08:00
|
|
|
// CHECK: int bar;
|
|
|
|
|
2008-02-07 14:03:59 +08:00
|
|
|
#define nested(x) int x comment cute little dead tokens...
|
|
|
|
|
|
|
|
nested(baz) rise of the dead tokens
|
|
|
|
|
|
|
|
;
|
|
|
|
|
2009-10-27 10:36:32 +08:00
|
|
|
// CHECK: int baz
|
|
|
|
// CHECK: ;
|
|
|
|
|
2010-07-18 00:24:30 +08:00
|
|
|
|
|
|
|
// rdar://8197149 - VC++ allows invalid token pastes: (##baz
|
|
|
|
#define foo(x) abc(x)
|
|
|
|
#define bar(y) foo(##baz(y))
|
|
|
|
bar(q)
|
|
|
|
|
|
|
|
// CHECK: abc(baz(q))
|