]> granicus.if.org Git - clang/commitdiff
[NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 5 Feb 2019 12:05:53 +0000 (12:05 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 5 Feb 2019 12:05:53 +0000 (12:05 +0000)
When Clang/LLVM is built with the CLANG_DEFAULT_STD_CXX CMake macro that sets
the default standard to something other than C++14, there are a number of lit
tests that fail as they rely on the C++14 default.
This patch just adds the language standard option explicitly to such test cases.

Differential revision: https://reviews.llvm.org/D57581

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353163 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/CodeCompletion/crash-skipped-bodies-template-inst.cpp
test/CodeCompletion/skip-auto-funcs.cpp
test/CodeGenCXX/auto-var-init.cpp
test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp
test/CodeGenCXX/new-overflow.cpp
test/CodeGenCXX/new.cpp
test/Lexer/cxx-features.cpp
test/Lexer/half-literal.cpp
test/Modules/friend-definition-2.cpp
test/Modules/merge-lambdas.cpp
test/SemaCXX/int-ptr-cast-SFINAE.cpp
test/SemaTemplate/argument-dependent-lookup.cpp
test/SemaTemplate/class-template-decl.cpp
test/SemaTemplate/typo-dependent-name.cpp

index 6161f100cb555dbbc560369edb48e1da512fa25c..7fec995ba061ba427fd79b2a0814c3784dd839b1 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:24:5 %s -o - 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++14 -code-completion-at=%s:24:5 %s -o - 2>&1 | FileCheck %s
 template <class T>
 auto make_func() {
   struct impl {
index ab2465d7fb0491ac2fc4dec87e57db6a1449368f..c0fa0f556daefe2d452d1472d513a743d159a99e 100644 (file)
@@ -1,7 +1,7 @@
 // We run clang in completion mode to force skipping of function bodies and
 // check if the function bodies were skipped by observing the warnings that
 // clang produces.
-// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:60:1 %s -o - 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -std=c++14 -fsyntax-only -code-completion-at=%s:60:1 %s -o - 2>&1 | FileCheck %s
 template <class T>
 auto not_skipped() {
   int x;
index 0d13c0af4e8f9b4417c47e17cf3d95ec73c2f351..44255b7d459f2e95717638547cf46560cb2b775c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO
 
 template<typename T> void used(T &) noexcept;
 
index 3866731a3cd9ac73e924d50ed8afded730217657..02cab5e2b4e05aa9fe90cf726b2a8d663c191dce 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 %s -fms-extensions -triple x86_64-windows-msvc       \
-// RUN:     -disable-llvm-passes                                        \
+// RUN:     -disable-llvm-passes -std=c++14                             \
 // RUN:     -fno-dllexport-inlines -emit-llvm -O1 -o - |                \
 // RUN:     FileCheck --check-prefix=CHECK --check-prefix=NOEXPORTINLINE %s
 
 // RUN: %clang_cc1 %s -fms-extensions -triple x86_64-windows-msvc       \
-// RUN:     -disable-llvm-passes                                        \
+// RUN:     -disable-llvm-passes -std=c++14                             \
 // RUN:     -emit-llvm -O1 -o - |                                       \
 // RUN:     FileCheck --check-prefix=CHECK  --check-prefix=EXPORTINLINE %s
 
index b27984f66ab667f524053bced79bae67b3b4318c..a2269bfc59fff6223e7408bf57c59aa9684c11b2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
 
 // rdar://problem/9246208
 
index 3bebc2ab8ac89f10f940dc5788cbebe38ced9868..1f5288d1d10ee2e17a8e8ae4194c9aec321d5614 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
 
 typedef __typeof__(sizeof(0)) size_t;
 
index 09b82b7c47ef472bfaa23ec6963e2cc85a8f960c..706a02fc8a66a3d270ceae939709c7017980feb7 100644 (file)
@@ -6,9 +6,9 @@
 //
 // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s
 // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
-// RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation
-// RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s
-// RUN: %clang_cc1 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s
+// RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation
+// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s
+// RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s
 // RUN: %clang_cc1 -std=c++2a -fno-char8_t -DNO_EXCEPTIONS -DNO_CHAR8_T -verify -fsized-deallocation %s
 
 // expected-no-diagnostics
index 2f1cf9589fab0a28ff5dfa9ed9e81c31df29e6c2..43d0b92872a702425ea09978e24bbea7706fe5db 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple aarch64-linux-gnu %s
+// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify -pedantic -triple aarch64-linux-gnu %s
 float a = 1.0h; // expected-error{{no matching literal operator for call to 'operator""h' with argument of type 'long double' or 'const char *', and no matching literal operator template}}
 float b = 1.0H; // expected-error{{invalid suffix 'H' on floating constant}}
 
index b226b5c0d1e5d1d121133e96dea9890d0cb87c1d..41c2141f4013925dbf9a2ee7b14818b9ccd9c97f 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fmodules %s -verify
-// RUN: %clang_cc1 -fmodules %s -verify -triple i686-windows
+// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify
+// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify -triple i686-windows
 // expected-no-diagnostics
 #pragma clang module build A
 module A {}
index 463a4c9b2fc63b39f620f3d2406eedad2b2b1962..da10ec1199853094598579302cbcbe813e7970bf 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fmodules -verify %s -emit-llvm-only
+// RUN: %clang_cc1 -std=c++14 -fmodules -verify %s -emit-llvm-only
 // expected-no-diagnostics
 
 #pragma clang module build A
index 0d2bb6083adae3ebade53c322f59532d5b080c8e..5782a6dbaeae09ec87bbb9090319e9394edd4ff8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++14
 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17
 
 void foo(int* a, int *b) {
index d1603d56b960a485d55bb6e99e44b6acb77c8b2b..77df49277fff5e06939fd241672ce9f5d3c0bfdf 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -verify %s
-// RUN: %clang_cc1 -verify %s -DHAVE_UNQUALIFIED_LOOKUP_RESULTS
+// RUN: %clang_cc1 -std=c++14 -verify %s
+// RUN: %clang_cc1 -std=c++14 -verify %s -DHAVE_UNQUALIFIED_LOOKUP_RESULTS
 // expected-no-diagnostics
 
 namespace address_of {
index c49154c6527a7d07df24625d88b0d236fc2eebd4..dd9dcd2de9f4c91c6922e817a42e82cae92102cc 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s
 
 template<typename T> class A;
 
index 0231740f6c2e1c1d77e91eb651ac079845ec95cb..88b2fc373b1f550680e777bdd5d988fffe5f17af 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s
 
 using nullptr_t = decltype(nullptr);