summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-06-26 21:19:20 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-06-26 21:19:20 +0000
commit0638c15a52d3970cd244155a6eb4a571850f432f (patch)
tree3c3c690aa9be1a6e7bfaecdf592f0ba82493cec3 /clang/test
parentf9ca2b07014d070e8959f14734a221606fdd3e81 (diff)
downloadbcm5719-llvm-0638c15a52d3970cd244155a6eb4a571850f432f.tar.gz
bcm5719-llvm-0638c15a52d3970cd244155a6eb4a571850f432f.zip
preprocessing: gcc supports #line 0. So, treat this
as a gcc supported extension with usual treatment with -pedantic (warn) and -pedantic-errors (error). // rdar://11550996 llvm-svn: 159226
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Preprocessor/line-directive.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Preprocessor/line-directive.c b/clang/test/Preprocessor/line-directive.c
index 28e93029a5c..da3c53368f8 100644
--- a/clang/test/Preprocessor/line-directive.c
+++ b/clang/test/Preprocessor/line-directive.c
@@ -3,8 +3,8 @@
// RUN: %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error: DEF'
#line 'a' // expected-error {{#line directive requires a positive integer argument}}
-#line 0 // expected-error {{#line directive requires a positive integer argument}}
-#line 00 // expected-error {{#line directive requires a positive integer argument}}
+#line 0 // expected-warning {{#line directive with zero argument is a GNU extension}}
+#line 00 // expected-warning {{#line directive with zero argument is a GNU extension}}
#line 2147483648 // expected-warning {{C requires #line number to be less than 2147483648, allowed as extension}}
#line 42 // ok
#line 42 'a' // expected-error {{invalid filename for #line directive}}
@@ -88,5 +88,8 @@ extern char array2[\
_\
_LINE__ == 42 ? 1: -1]; /* line marker is location of first _ */
+// rdar://11550996
+#line 0 "line-directive.c" // expected-warning {{#line directive with zero argument is a GNU extension}}
+undefined t; // expected-error {{unknown type name 'undefined'}}
OpenPOWER on IntegriCloud