blob: 047726fbef9400d25cac0980661b7af71b832967 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// This file checks output given when processing C/ObjC files.
// When user selects invalid language standard
// print out supported values with short description.
// RUN: not %clang %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s
// RUN: not %clang -x objective-c %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s
// RUN: not %clang -x renderscript %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s
// CHECK: error: invalid value 'foobar' in '-std=foobar'
// CHECK-NEXT: note: use 'c89' for 'ISO C 1990' standard
// CHECK-NEXT: note: use 'c90' for 'ISO C 1990' standard
// CHECK-NEXT: note: use 'iso9899:1990' for 'ISO C 1990' standard
// CHECK-NEXT: note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
// CHECK-NEXT: note: use 'gnu89' for 'ISO C 1990 with GNU extensions' standard
// CHECK-NEXT: note: use 'gnu90' for 'ISO C 1990 with GNU extensions' standard
// CHECK-NEXT: note: use 'c99' for 'ISO C 1999' standard
// CHECK-NEXT: note: use 'c9x' for 'ISO C 1999' standard
// CHECK-NEXT: note: use 'iso9899:1999' for 'ISO C 1999' standard
// CHECK-NEXT: note: use 'iso9899:199x' for 'ISO C 1999' standard
// CHECK-NEXT: note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
// CHECK-NEXT: note: use 'gnu9x' for 'ISO C 1999 with GNU extensions' standard
// CHECK-NEXT: note: use 'c11' for 'ISO C 2011' standard
// CHECK-NEXT: note: use 'c1x' for 'ISO C 2011' standard
// CHECK-NEXT: note: use 'iso9899:2011' for 'ISO C 2011' standard
// CHECK-NEXT: note: use 'iso9899:201x' for 'ISO C 2011' standard
// CHECK-NEXT: note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
// CHECK-NEXT: note: use 'gnu1x' for 'ISO C 2011 with GNU extensions' standard
// Make sure that no other output is present.
// CHECK-NOT: {{^.+$}}
|