Author: ygao Date: Fri Jul 31 21:55:59 2015 New Revision: 243819 URL: http://llvm.org/viewvc/llvm-project?rev=243819&view=rev Log: [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 Modified: cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp cfe/trunk/test/Lexer/has_feature_cxx0x.cpp cfe/trunk/test/Lexer/ms-extensions.cpp cfe/trunk/test/Preprocessor/macro-reserved-cxx11.cpp cfe/trunk/test/Preprocessor/macro-reserved.cpp Modified: cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp?rev=243819&r1=243818&r2=243819&view=diff ============================================================================== --- cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp (original) +++ cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp Fri Jul 31 21:55:59 2015 @@ -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; Modified: cfe/trunk/test/Lexer/has_feature_cxx0x.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_cxx0x.cpp?rev=243819&r1=243818&r2=243819&view=diff ============================================================================== --- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original) +++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Fri Jul 31 21:55:59 2015 @@ -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 Modified: cfe/trunk/test/Lexer/ms-extensions.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/ms-extensions.cpp?rev=243819&r1=243818&r2=243819&view=diff ============================================================================== --- cfe/trunk/test/Lexer/ms-extensions.cpp (original) +++ cfe/trunk/test/Lexer/ms-extensions.cpp Fri Jul 31 21:55:59 2015 @@ -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() { Modified: cfe/trunk/test/Preprocessor/macro-reserved-cxx11.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro-reserved-cxx11.cpp?rev=243819&r1=243818&r2=243819&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/macro-reserved-cxx11.cpp (original) +++ cfe/trunk/test/Preprocessor/macro-reserved-cxx11.cpp Fri Jul 31 21:55:59 2015 @@ -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}} Modified: cfe/trunk/test/Preprocessor/macro-reserved.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro-reserved.cpp?rev=243819&r1=243818&r2=243819&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/macro-reserved.cpp (original) +++ cfe/trunk/test/Preprocessor/macro-reserved.cpp Fri Jul 31 21:55:59 2015 @@ -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 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
