2017-02-15 06:44:20 +08:00
|
|
|
// This file checks output given when processing C++/ObjC++ files.
|
|
|
|
// When user selects invalid language standard
|
|
|
|
// print out supported values with short description.
|
|
|
|
|
2017-04-27 07:44:33 +08:00
|
|
|
// 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
|
2017-12-13 02:33:39 +08:00
|
|
|
// 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
|
2017-02-15 06:44:20 +08:00
|
|
|
|
|
|
|
// CHECK: error: invalid value 'foobar' in '-std=foobar'
|
2017-04-27 09:17:05 +08:00
|
|
|
// CHECK-NEXT: note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
|
2017-02-15 06:44:20 +08:00
|
|
|
// CHECK-NEXT: note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
|
|
|
|
// CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
|
2017-08-10 04:12:53 +08:00
|
|
|
// CHECK-NEXT: note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
|
2020-02-19 08:13:23 +08:00
|
|
|
// CHECK-NEXT: note: use 'c++20' for 'ISO C++ 2020 DIS' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++20' for 'ISO C++ 2020 DIS with GNU extensions' standard
|
2020-12-03 17:27:09 +08:00
|
|
|
// CHECK-NEXT: note: use 'c++2b' for 'Working draft for ISO C++ 2023 DIS' standard
|
|
|
|
// CHECK-NEXT: note: use 'gnu++2b' for 'Working draft for ISO C++ 2023 DIS with GNU extensions' standard
|
2017-04-27 07:44:33 +08:00
|
|
|
// CUDA-NEXT: note: use 'cuda' for 'NVIDIA CUDA(tm)' standard
|
2017-02-15 06:44:20 +08:00
|
|
|
|
|
|
|
// Make sure that no other output is present.
|
|
|
|
// CHECK-NOT: {{^.+$}}
|
|
|
|
|