Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 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 | |
Richard Smith | b0fe704 | 2017-04-26 23:44:33 +0000 | [diff] [blame] | 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 |
Kelvin Li | af7c0ef | 2017-12-12 18:33:39 +0000 | [diff] [blame] | 7 | // RUN: not %clang -x cuda -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s -std=foobar -c 2>&1 | FileCheck --match-full-lines --check-prefix=CHECK --check-prefix=CUDA %s |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 8 | |
| 9 | // CHECK: error: invalid value 'foobar' in '-std=foobar' |
Richard Smith | 8c8fb80 | 2017-04-27 01:17:05 +0000 | [diff] [blame] | 10 | // CHECK-NEXT: note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard |
| 11 | // CHECK-NEXT: note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 12 | // CHECK-NEXT: note: use 'c++11' for 'ISO C++ 2011 with amendments' standard |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 13 | // CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 14 | // CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 15 | // CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard |
Hans Wennborg | 7d928cc | 2017-08-09 20:12:53 +0000 | [diff] [blame] | 16 | // CHECK-NEXT: note: use 'c++17' for 'ISO C++ 2017 with amendments' standard |
| 17 | // CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard |
Faisal Vali | 5f475b9 | 2017-07-16 00:23:04 +0000 | [diff] [blame] | 18 | // CHECK-NEXT: note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard |
| 19 | // CHECK-NEXT: note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard |
Richard Smith | b0fe704 | 2017-04-26 23:44:33 +0000 | [diff] [blame] | 20 | // CUDA-NEXT: note: use 'cuda' for 'NVIDIA CUDA(tm)' standard |
Richard Smith | c91daf1 | 2017-02-14 22:44:20 +0000 | [diff] [blame] | 21 | |
| 22 | // Make sure that no other output is present. |
| 23 | // CHECK-NOT: {{^.+$}} |
| 24 | |