aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/line-directive.c
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-11 19:58:23 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-11 19:58:23 +0000
commit78541c433049322b27b4f437973076ba29cff709 (patch)
tree277d3272b9b897d6897ff5d4457ebc1e65a82938 /test/Preprocessor/line-directive.c
parent2db5abb43b7a7fce4771063f6a5de561780c1335 (diff)
Allow -verify directives to be filtered by preprocessing.
This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler, which then only reads the -verify directives that are actually in live blocks of code. It also makes it simpler to handle -verify directives that appear in header files, though we still have to manually reparse some files depending on how they are generated. This requires some test changes. In particular, all PCH tests now have their -verify directives outside the "header" portion of the file, using the @line syntax added in r159978. Other tests have been modified mostly to make it clear what is being tested, and to prevent polluting the expected output with the directives themselves. Patch by Andy Gibbs! (with slight modifications) The new Frontend/verify-* tests exercise the functionality of this commit, as well as r159978, r159979, and r160053 (Andy's other -verify enhancements). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/line-directive.c')
-rw-r--r--test/Preprocessor/line-directive.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c
index da3c53368f..ffa7c5a419 100644
--- a/test/Preprocessor/line-directive.c
+++ b/test/Preprocessor/line-directive.c
@@ -33,8 +33,11 @@
// These are checked by the RUN line.
#line 92 "blonk.c"
-#error ABC // expected-error {{#error ABC}}
-#error DEF // expected-error {{#error DEF}}
+#error ABC
+#error DEF
+// expected-error@-2 {{ABC}}
+#line 150
+// expected-error@-3 {{DEF}}
// Verify that linemarker diddling of the system header flag works.