From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/Preprocessor/macro_paste_msextensions.c | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/Preprocessor/macro_paste_msextensions.c (limited to 'test/Preprocessor/macro_paste_msextensions.c') diff --git a/test/Preprocessor/macro_paste_msextensions.c b/test/Preprocessor/macro_paste_msextensions.c new file mode 100644 index 0000000..c5b4213 --- /dev/null +++ b/test/Preprocessor/macro_paste_msextensions.c @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -P -E -fms-extensions %s | FileCheck -strict-whitespace %s + +// This horrible stuff should preprocess into (other than whitespace): +// int foo; +// int bar; +// int baz; + +int foo; + +// CHECK: int foo; + +#define comment /##/ dead tokens live here +comment This is stupidity + +int bar; + +// CHECK: int bar; + +#define nested(x) int x comment cute little dead tokens... + +nested(baz) rise of the dead tokens + +; + +// CHECK: int baz +// CHECK: ; + + +// 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)) -- cgit v1.1