mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-07 14:12:09 +00:00
127f6eef7e
1. Teach Lexer that pragma lexers are like macro expansions at EOF. 2. Treat pragmas like #define/#undef when printing. 3. If we just printed a directive, add a newline before any more tokens. (4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp) PR10594 and <rdar://problem/11562490> (two separate related problems) llvm-svn: 158571
23 lines
428 B
C
23 lines
428 B
C
// RUN: %clang_cc1 -E -C %s | FileCheck -strict-whitespace %s
|
|
|
|
// foo
|
|
// CHECK: // foo
|
|
|
|
/* bar */
|
|
// CHECK: /* bar */
|
|
|
|
#if FOO
|
|
#endif
|
|
/* baz */
|
|
// CHECK: /* baz */
|
|
|
|
_Pragma("unknown") // after unknown pragma
|
|
// CHECK: #pragma unknown
|
|
// CHECK-NEXT: #
|
|
// CHECK-NEXT: // after unknown pragma
|
|
|
|
_Pragma("comment(\"abc\")") // after known pragma
|
|
// CHECK: #pragma comment("abc")
|
|
// CHECK-NEXT: #
|
|
// CHECK-NEXT: // after known pragma
|