]> granicus.if.org Git - clang/commitdiff
[Tests] Add explicit -std=lang option to a number of tests.
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Sat, 1 Aug 2015 02:55:59 +0000 (02:55 +0000)
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Sat, 1 Aug 2015 02:55:59 +0000 (02:55 +0000)
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

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

test/Lexer/cxx0x_keyword_as_cxx98.cpp
test/Lexer/has_feature_cxx0x.cpp
test/Lexer/ms-extensions.cpp
test/Preprocessor/macro-reserved-cxx11.cpp
test/Preprocessor/macro-reserved.cpp

index 5d168100412d2d68b8f5ea5efb8fbca82c061eb8..8f5fcf40b22ee68580061b383a020667436f64e6 100644 (file)
@@ -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;
index dbb650e1b2257724103971127c74d3d9c790cfde..8c7ff18860a276bb36ca89fdf5ceb3768184c1b6 100644 (file)
@@ -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
 
index 7e18a6cb2bc80eadedc8a7518be2a25fb0a73f3a..9a858a4ff32371d811f1e5acafa9f848b7d51864 100644 (file)
@@ -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() {
index a740ff6129543d2133f4d0bf31893c1ad8251a96..6daea953e8a60043a19ea93c82d8dfb4d2eeb9b8 100644 (file)
@@ -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}}
index ba1594a0af494d83a104854951e71ce83e2c4c94..d1f70317f7aaa54a38d9c4dc265810f7044cd5cd 100644 (file)
@@ -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