25 lines · c
1// This file checks output given when processing C/ObjC files.2// When user selects invalid language standard3// print out supported values with short description.4 5// RUN: not %clang %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s6// RUN: not %clang -x objective-c %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s7 8// CHECK: error: invalid value 'foobar' in '-std=foobar'9// CHECK-NEXT: note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard10// CHECK-NEXT: note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard11// CHECK-NEXT: note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard12// CHECK-NEXT: note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard13// CHECK-NEXT: note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard14// CHECK-NEXT: note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard15// CHECK-NEXT: note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard16// CHECK-NEXT: note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard17// CHECK-NEXT: note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard18// CHECK-NEXT: note: use 'c23' or 'iso9899:2024' for 'ISO C 2023' standard19// CHECK-NEXT: note: use 'gnu23' for 'ISO C 2023 with GNU extensions' standard20// CHECK-NEXT: note: use 'c2y' for 'Working Draft for ISO C2y' standard21// CHECK-NEXT: note: use 'gnu2y' for 'Working Draft for ISO C2y with GNU extensions' standard22 23// Make sure that no other output is present.24// CHECK-NOT: {{^.+$}}25