diff options
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/if_warning.c | 4 | ||||
-rw-r--r-- | test/Preprocessor/pragma_sysheader.c | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/Preprocessor/if_warning.c b/test/Preprocessor/if_warning.c index 345ac95..641ec3b 100644 --- a/test/Preprocessor/if_warning.c +++ b/test/Preprocessor/if_warning.c @@ -20,6 +20,10 @@ extern int x; #endif #endif +// rdar://9475098 +#if 0 +#else 1 // expected-warning {{extra tokens}} +#endif // PR6852 #if 'somesillylongthing' // expected-warning {{character constant too long for its type}} \ diff --git a/test/Preprocessor/pragma_sysheader.c b/test/Preprocessor/pragma_sysheader.c index cf2843b..2641682 100644 --- a/test/Preprocessor/pragma_sysheader.c +++ b/test/Preprocessor/pragma_sysheader.c @@ -1,3 +1,12 @@ // RUN: %clang -verify -pedantic %s -fsyntax-only +// RUN: %clang_cc1 -E %s | FileCheck %s // rdar://6899937 #include "pragma_sysheader.h" + + +// PR9861: Verify that line markers are not messed up in -E mode. +// CHECK: # 1 "{{.*}}pragma_sysheader.h" 1 +// CHECK-NEXT: # 1 "{{.*}}pragma_sysheader.h" 3 +// CHECK-NEXT: typedef int x; +// CHECK-NEXT: typedef int x; +// CHECK-NEXT: # 5 "{{.*}}pragma_sysheader.c" 2 |