diff options
Diffstat (limited to 'test/Lexer/pragma-operators.cpp')
-rw-r--r-- | test/Lexer/pragma-operators.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Lexer/pragma-operators.cpp b/test/Lexer/pragma-operators.cpp new file mode 100644 index 0000000000..af346e8c96 --- /dev/null +++ b/test/Lexer/pragma-operators.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fms-extensions -E %s | FileCheck %s + +// Test that we properly expand the C99 _Pragma and Microsoft __pragma +// into #pragma directives, with newlines where needed. <rdar://problem/8412013> + +// CHECK: extern +// CHECK: #line +// CHECK: #pragma warning(push) +// CHECK: #line +// CHECK: ; void f0(); +// CHECK: #line +// CHECK: #pragma warning(pop) +// CHECK: #line +// CHECK: ; } +extern "C" { _Pragma("warning(push)"); void f0(); __pragma(warning(pop)); } |