aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/line-directive.c
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2013-04-10 01:41:19 +0000
committerMichael Ilseman <milseman@apple.com>2013-04-10 01:41:19 +0000
commit60c99d34cf28c002718b61c2f058d1e84923a634 (patch)
tree570dc94045c97f22745b80c91ba941e08b5eb19d /test/Preprocessor/line-directive.c
parentec27608da7f15b265135f5743fe71da1f8e25ee9 (diff)
Repeat some #line directive tests for the GNU line marker directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/line-directive.c')
-rw-r--r--test/Preprocessor/line-directive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c
index 95a9b904de..ea0a36fca3 100644
--- a/test/Preprocessor/line-directive.c
+++ b/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'}}