r179142 - Repeat some #line directive tests for the GNU line marker directive.

Michael Ilseman milseman at apple.com
Tue Apr 9 18:41:19 PDT 2013


Author: milseman
Date: Tue Apr  9 20:41:19 2013
New Revision: 179142

URL: http://llvm.org/viewvc/llvm-project?rev=179142&view=rev
Log:
Repeat some #line directive tests for the GNU line marker directive.


Modified:
    cfe/trunk/test/Preprocessor/line-directive.c

Modified: cfe/trunk/test/Preprocessor/line-directive.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/line-directive.c?rev=179142&r1=179141&r2=179142&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/line-directive.c (original)
+++ cfe/trunk/test/Preprocessor/line-directive.c Tue Apr  9 20:41:19 2013
@@ -83,15 +83,22 @@ typedef int q;  // original definition i
 // 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'}}





More information about the cfe-commits mailing list