blob: 0ffc1e2cb71f3876d9b41650c5a4a598352eb5d6 [file] [log] [blame]
Richard Smithc91daf12017-02-14 22:44:20 +00001// 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 Smithb0fe7042017-04-26 23:44:33 +00005// 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 %s -std=foobar -c 2>&1 | FileCheck --match-full-lines --check-prefix=CHECK --check-prefix=CUDA %s
Richard Smithc91daf12017-02-14 22:44:20 +00008
9// CHECK: error: invalid value 'foobar' in '-std=foobar'
10// CHECK-NEXT: note: use 'c++98' for 'ISO C++ 1998 with amendments' standard
11// CHECK-NEXT: note: use 'c++03' for 'ISO C++ 1998 with amendments' standard
12// CHECK-NEXT: note: use 'gnu++98' for 'ISO C++ 1998 with amendments and GNU extensions' standard
13// CHECK-NEXT: note: use 'c++0x' for 'ISO C++ 2011 with amendments' standard
14// CHECK-NEXT: note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
15// CHECK-NEXT: note: use 'gnu++0x' for 'ISO C++ 2011 with amendments and GNU extensions' standard
16// CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
17// CHECK-NEXT: note: use 'c++1y' for 'ISO C++ 2014 with amendments' standard
18// CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
19// CHECK-NEXT: note: use 'gnu++1y' for 'ISO C++ 2014 with amendments and GNU extensions' standard
20// CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
21// CHECK-NEXT: note: use 'c++1z' for 'Working draft for ISO C++ 2017' standard
22// CHECK-NEXT: note: use 'gnu++1z' for 'Working draft for ISO C++ 2017 with GNU extensions' standard
Richard Smithb0fe7042017-04-26 23:44:33 +000023// CUDA-NEXT: note: use 'cuda' for 'NVIDIA CUDA(tm)' standard
Richard Smithc91daf12017-02-14 22:44:20 +000024
25// Make sure that no other output is present.
26// CHECK-NOT: {{^.+$}}
27