diff options
Diffstat (limited to 'clang/test/Preprocessor/pragma_microsoft.c')
-rw-r--r-- | clang/test/Preprocessor/pragma_microsoft.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/pragma_microsoft.c b/clang/test/Preprocessor/pragma_microsoft.c index 9d62d018387..020292a4b25 100644 --- a/clang/test/Preprocessor/pragma_microsoft.c +++ b/clang/test/Preprocessor/pragma_microsoft.c @@ -51,6 +51,8 @@ __pragma(comment(linker," bar=" BAR)) __pragma(warning(pop)); \ } +#define PRAGMA_IN_ARGS(p) p + void f() { __pragma() // expected-warning{{unknown pragma ignored}} @@ -64,8 +66,16 @@ void f() // CHECK: #pragma warning(disable: 10000) // CHECK: ; 1 + (2 > 3) ? 4 : 5; // CHECK: #pragma warning(pop) -} + // Check that macro arguments can contain __pragma. + PRAGMA_IN_ARGS(MACRO_WITH__PRAGMA) // expected-warning {{lower precedence}} \ + // expected-note 2 {{place parentheses}} \ + // expected-warning {{expression result unused}} +// CHECK: #pragma warning(push) +// CHECK: #pragma warning(disable: 10000) +// CHECK: ; 1 + (2 > 3) ? 4 : 5; +// CHECK: #pragma warning(pop) +} // This should include macro_arg_directive even though the include // is looking for test.h This allows us to assign to "n" |