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
-// 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;
// 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
-// 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() {
// 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}}
-// 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