summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/line-directive.c
blob: e1adc6116df3a8e15f6085b9a10f5032ac963254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: clang -fsyntax-only -verify -pedantic %s

#line 'a'            // expected-error {{#line directive requires a positive integer argument}}
#line 0              // expected-error {{#line directive requires a positive integer argument}}
#line 2147483648     // expected-warning {{C requires #line number to be less than 2147483648, allowed as extension}}
#line 42             // ok
#line 42 'a'         // expected-error {{nvalid filename for #line directive}}
#line 42 "foo/bar/baz.h"  // ok


// #line directives expand macros.
#define A 42 "foo"
#line A

OpenPOWER on IntegriCloud