summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Preprocessor')
-rw-r--r--clang/test/Preprocessor/line-directive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/line-directive.c b/clang/test/Preprocessor/line-directive.c
index 95a9b904de9..ea0a36fca35 100644
--- a/clang/test/Preprocessor/line-directive.c
+++ b/clang/test/Preprocessor/line-directive.c
@@ -83,15 +83,22 @@ typedef int q; // original definition in system header, should not diagnose.
// Line markers are digit strings interpreted as decimal numbers, this is
// 10, not 8.
#line 010 // expected-warning {{#line directive interprets number as decimal, not octal}}
-# 010 // expected-warning {{GNU line marker directive interprets number as decimal, not octal}}
extern int array[__LINE__ == 10 ? 1:-1];
+# 020 // expected-warning {{GNU line marker directive interprets number as decimal, not octal}}
+extern int array_gnuline[__LINE__ == 20 ? 1:-1];
+
/* PR3917 */
#line 41
extern char array2[\
_\
_LINE__ == 42 ? 1: -1]; /* line marker is location of first _ */
+# 51
+extern char array2_gnuline[\
+_\
+_LINE__ == 52 ? 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