r353163 - [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
Nemanja Ivanovic via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 5 04:05:53 PST 2019
Author: nemanjai
Date: Tue Feb 5 04:05:53 2019
New Revision: 353163
URL: http://llvm.org/viewvc/llvm-project?rev=353163&view=rev
Log:
[NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
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
Modified:
cfe/trunk/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp
cfe/trunk/test/CodeCompletion/skip-auto-funcs.cpp
cfe/trunk/test/CodeGenCXX/auto-var-init.cpp
cfe/trunk/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp
cfe/trunk/test/CodeGenCXX/new-overflow.cpp
cfe/trunk/test/CodeGenCXX/new.cpp
cfe/trunk/test/Lexer/cxx-features.cpp
cfe/trunk/test/Lexer/half-literal.cpp
cfe/trunk/test/Modules/friend-definition-2.cpp
cfe/trunk/test/Modules/merge-lambdas.cpp
cfe/trunk/test/SemaCXX/int-ptr-cast-SFINAE.cpp
cfe/trunk/test/SemaTemplate/argument-dependent-lookup.cpp
cfe/trunk/test/SemaTemplate/class-template-decl.cpp
cfe/trunk/test/SemaTemplate/typo-dependent-name.cpp
Modified: cfe/trunk/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp (original)
+++ cfe/trunk/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp Tue Feb 5 04:05:53 2019
@@ -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 {
Modified: cfe/trunk/test/CodeCompletion/skip-auto-funcs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/skip-auto-funcs.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeCompletion/skip-auto-funcs.cpp (original)
+++ cfe/trunk/test/CodeCompletion/skip-auto-funcs.cpp Tue Feb 5 04:05:53 2019
@@ -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;
Modified: cfe/trunk/test/CodeGenCXX/auto-var-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/auto-var-init.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/auto-var-init.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/auto-var-init.cpp Tue Feb 5 04:05:53 2019
@@ -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;
Modified: cfe/trunk/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp Tue Feb 5 04:05:53 2019
@@ -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
Modified: cfe/trunk/test/CodeGenCXX/new-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/new-overflow.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/new-overflow.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/new-overflow.cpp Tue Feb 5 04:05:53 2019
@@ -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
Modified: cfe/trunk/test/CodeGenCXX/new.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/new.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/new.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/new.cpp Tue Feb 5 04:05:53 2019
@@ -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;
Modified: cfe/trunk/test/Lexer/cxx-features.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/cxx-features.cpp (original)
+++ cfe/trunk/test/Lexer/cxx-features.cpp Tue Feb 5 04:05:53 2019
@@ -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
Modified: cfe/trunk/test/Lexer/half-literal.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/half-literal.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/half-literal.cpp (original)
+++ cfe/trunk/test/Lexer/half-literal.cpp Tue Feb 5 04:05:53 2019
@@ -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}}
Modified: cfe/trunk/test/Modules/friend-definition-2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/friend-definition-2.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/Modules/friend-definition-2.cpp (original)
+++ cfe/trunk/test/Modules/friend-definition-2.cpp Tue Feb 5 04:05:53 2019
@@ -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 {}
Modified: cfe/trunk/test/Modules/merge-lambdas.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/merge-lambdas.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/Modules/merge-lambdas.cpp (original)
+++ cfe/trunk/test/Modules/merge-lambdas.cpp Tue Feb 5 04:05:53 2019
@@ -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
Modified: cfe/trunk/test/SemaCXX/int-ptr-cast-SFINAE.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/int-ptr-cast-SFINAE.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/int-ptr-cast-SFINAE.cpp (original)
+++ cfe/trunk/test/SemaCXX/int-ptr-cast-SFINAE.cpp Tue Feb 5 04:05:53 2019
@@ -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) {
Modified: cfe/trunk/test/SemaTemplate/argument-dependent-lookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/argument-dependent-lookup.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/argument-dependent-lookup.cpp (original)
+++ cfe/trunk/test/SemaTemplate/argument-dependent-lookup.cpp Tue Feb 5 04:05:53 2019
@@ -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 {
Modified: cfe/trunk/test/SemaTemplate/class-template-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/class-template-decl.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/class-template-decl.cpp (original)
+++ cfe/trunk/test/SemaTemplate/class-template-decl.cpp Tue Feb 5 04:05:53 2019
@@ -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;
Modified: cfe/trunk/test/SemaTemplate/typo-dependent-name.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/typo-dependent-name.cpp?rev=353163&r1=353162&r2=353163&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/typo-dependent-name.cpp (original)
+++ cfe/trunk/test/SemaTemplate/typo-dependent-name.cpp Tue Feb 5 04:05:53 2019
@@ -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);
More information about the cfe-commits
mailing list