1 // RUN: %clang_cc1 -verify -fms-extensions -Wmicrosoft %s
2 // RUN: not %clang_cc1 -P -E -fms-extensions %s | FileCheck -strict-whitespace %s
4 // This horrible stuff should preprocess into (other than whitespace):
13 #define comment /##/ dead tokens live here
14 // expected-warning@+1 {{pasting two '/' tokens}}
15 comment This is stupidity
21 #define nested(x) int x comment cute little dead tokens...
23 // expected-warning@+1 {{pasting two '/' tokens}}
24 nested(baz
) rise of the dead tokens
32 // rdar://8197149 - VC++ allows invalid token pastes: (##baz
34 #define bar(y) foo(##baz(y))
35 bar(q
) // expected-error {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}}
41 #define collapse_spaces(a, b, c, d) str(a ## - ## b ## - ## c ## d)
42 collapse_spaces(1a
, b2
, 3c
, d4
) // expected-error 4 {{invalid preprocessing token}} expected-error {{expected function body}}
44 // CHECK: "1a-b2-3cd4"