| 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 | FileCheck --match-full-lines %s |
| 6 |
// RUN: not %clang -x objective-c++ %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s |
| 7 |
// RUN: not %clang -x cuda -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ |
| 8 |
// RUN: %s -std=foobar -c 2>&1 | FileCheck --match-full-lines %s |
| 9 |
// RUN: not %clang -x hip -nocudainc -nocudalib %s -std=foobar -c 2>&1 \ |
| 10 |
// RUN: | FileCheck --match-full-lines %s |
| 11 |
|
| 12 |
// CHECK: error: invalid value 'foobar' in '-std=foobar' |
| 13 |
// CHECK-NEXT: note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard |
| 14 |
// CHECK-NEXT: note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard |
| 15 |
// CHECK-NEXT: note: use 'c++11' for 'ISO C++ 2011 with amendments' standard |
| 16 |
// CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard |
| 17 |
// CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard |
| 18 |
// CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard |
| 19 |
// CHECK-NEXT: note: use 'c++17' for 'ISO C++ 2017 with amendments' standard |
| 20 |
// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard |
| 21 |
// CHECK-NEXT: note: use 'c++20' for 'ISO C++ 2020 DIS' standard |
| 22 |
// CHECK-NEXT: note: use 'gnu++20' for 'ISO C++ 2020 DIS with GNU extensions' standard |
| 23 |
// CHECK-NEXT: note: use 'c++23' for 'ISO C++ 2023 DIS' standard |
| 24 |
// CHECK-NEXT: note: use 'gnu++23' for 'ISO C++ 2023 DIS with GNU extensions' standard |
| 25 |
// CHECK-NEXT: note: use 'c++2c' or 'c++26' for 'Working draft for C++2c' standard |
| 26 |
// CHECK-NEXT: note: use 'gnu++2c' or 'gnu++26' for 'Working draft for C++2c with GNU extensions' standard |
| 27 |
|
| 28 |
// Make sure that no other output is present. |
| 29 |
// CHECK-NOT: {{^.+$}} |
| 30 |
|