]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Driver/unknown-std.c
Vendor import of clang trunk r300422:
[FreeBSD/FreeBSD.git] / test / Driver / unknown-std.c
1 // This file checks output given when processing C/ObjC files.
2 // When user selects invalid language standard
3 // print out supported values with short description.
4
5 // RUN: not %clang %s -std=foobar -c 2>&1 | \
6 // RUN: FileCheck --match-full-lines %s
7
8 // CHECK: error: invalid value 'foobar' in '-std=foobar'
9 // CHECK-NEXT: note: use 'c89' for 'ISO C 1990' standard
10 // CHECK-NEXT: note: use 'c90' for 'ISO C 1990' standard
11 // CHECK-NEXT: note: use 'iso9899:1990' for 'ISO C 1990' standard
12 // CHECK-NEXT: note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
13 // CHECK-NEXT: note: use 'gnu89' for 'ISO C 1990 with GNU extensions' standard
14 // CHECK-NEXT: note: use 'gnu90' for 'ISO C 1990 with GNU extensions' standard
15 // CHECK-NEXT: note: use 'c99' for 'ISO C 1999' standard
16 // CHECK-NEXT: note: use 'c9x' for 'ISO C 1999' standard
17 // CHECK-NEXT: note: use 'iso9899:1999' for 'ISO C 1999' standard
18 // CHECK-NEXT: note: use 'iso9899:199x' for 'ISO C 1999' standard
19 // CHECK-NEXT: note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
20 // CHECK-NEXT: note: use 'gnu9x' for 'ISO C 1999 with GNU extensions' standard
21 // CHECK-NEXT: note: use 'c11' for 'ISO C 2011' standard
22 // CHECK-NEXT: note: use 'c1x' for 'ISO C 2011' standard
23 // CHECK-NEXT: note: use 'iso9899:2011' for 'ISO C 2011' standard
24 // CHECK-NEXT: note: use 'iso9899:201x' for 'ISO C 2011' standard
25 // CHECK-NEXT: note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
26 // CHECK-NEXT: note: use 'gnu1x' for 'ISO C 2011 with GNU extensions' standard
27 // CHECK-NEXT: note: use 'cl' for 'OpenCL 1.0' standard
28 // CHECK-NEXT: note: use 'cl1.1' for 'OpenCL 1.1' standard
29 // CHECK-NEXT: note: use 'cl1.2' for 'OpenCL 1.2' standard
30 // CHECK-NEXT: note: use 'cl2.0' for 'OpenCL 2.0' standard
31
32 // Make sure that no other output is present.
33 // CHECK-NOT: {{^.+$}}
34