diff options
| author | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2015-08-01 02:55:59 +0000 |
|---|---|---|
| committer | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2015-08-01 02:55:59 +0000 |
| commit | 7704ba7f97b35bb465384248a204e549f3c18263 (patch) | |
| tree | cb99c78f1d172bbf8f3ef3718498cac05a1f344d /clang | |
| parent | 86a5fba71d5b5503591f28a6817f8808c756bdc4 (diff) | |
| download | bcm5719-llvm-7704ba7f97b35bb465384248a204e549f3c18263.tar.gz bcm5719-llvm-7704ba7f97b35bb465384248a204e549f3c18263.zip | |
[Tests] Add explicit -std=lang option to a number of tests.
This patch should not change the test results, but it is useful if clang's
default C++ language is ever changed from gnu++98.
Patch by: Charles Li
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150727/134667.html
llvm-svn: 243819
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Lexer/has_feature_cxx0x.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Lexer/ms-extensions.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Preprocessor/macro-reserved-cxx11.cpp | 1 | ||||
| -rw-r--r-- | clang/test/Preprocessor/macro-reserved.cpp | 2 |
5 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp b/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp index 5d168100412..8f5fcf40b22 100644 --- a/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp +++ b/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wc++11-compat +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wc++11-compat -std=c++98 #define constexpr const constexpr int x = 0; diff --git a/clang/test/Lexer/has_feature_cxx0x.cpp b/clang/test/Lexer/has_feature_cxx0x.cpp index dbb650e1b22..8c7ff18860a 100644 --- a/clang/test/Lexer/has_feature_cxx0x.cpp +++ b/clang/test/Lexer/has_feature_cxx0x.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -E -triple x86_64-linux-gnu -std=c++11 %s -o - | FileCheck --check-prefix=CHECK-11 %s // RUN: %clang_cc1 -E -triple armv7-apple-darwin -std=c++11 %s -o - | FileCheck --check-prefix=CHECK-NO-TLS %s -// RUN: %clang_cc1 -E -triple x86_64-linux-gnu %s -o - | FileCheck --check-prefix=CHECK-NO-11 %s +// RUN: %clang_cc1 -E -triple x86_64-linux-gnu -std=c++98 %s -o - | FileCheck --check-prefix=CHECK-NO-11 %s // RUN: %clang_cc1 -E -triple x86_64-linux-gnu -std=c++14 %s -o - | FileCheck --check-prefix=CHECK-14 %s // RUN: %clang_cc1 -E -triple x86_64-linux-gnu -std=c++1z %s -o - | FileCheck --check-prefix=CHECK-1Z %s diff --git a/clang/test/Lexer/ms-extensions.cpp b/clang/test/Lexer/ms-extensions.cpp index 7e18a6cb2bc..9a858a4ff32 100644 --- a/clang/test/Lexer/ms-extensions.cpp +++ b/clang/test/Lexer/ms-extensions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wreserved-user-defined-literal -fms-extensions -fms-compatibility %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wreserved-user-defined-literal -fms-extensions -fms-compatibility -std=c++98 %s #define bar(x) #x const char * f() { diff --git a/clang/test/Preprocessor/macro-reserved-cxx11.cpp b/clang/test/Preprocessor/macro-reserved-cxx11.cpp index a740ff61295..6daea953e8a 100644 --- a/clang/test/Preprocessor/macro-reserved-cxx11.cpp +++ b/clang/test/Preprocessor/macro-reserved-cxx11.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -pedantic -verify %s #define for 0 // expected-warning {{keyword is hidden by macro definition}} #define final 1 // expected-warning {{keyword is hidden by macro definition}} diff --git a/clang/test/Preprocessor/macro-reserved.cpp b/clang/test/Preprocessor/macro-reserved.cpp index ba1594a0af4..d1f70317f7a 100644 --- a/clang/test/Preprocessor/macro-reserved.cpp +++ b/clang/test/Preprocessor/macro-reserved.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -std=c++98 %s #define for 0 // expected-warning {{keyword is hidden by macro definition}} #define final 1 |

