r290120 - Make a few OpenMP tests "C++11 clean."

Paul Robinson via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 09:58:09 PST 2016


Author: probinson
Date: Mon Dec 19 11:58:09 2016
New Revision: 290120

URL: http://llvm.org/viewvc/llvm-project?rev=290120&view=rev
Log:
Make a few OpenMP tests "C++11 clean."

Reviewed by abataev (in D27794)


Modified:
    cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp
    cfe/trunk/test/CodeGenCXX/destructors.cpp
    cfe/trunk/test/CodeGenCXX/global-init.cpp
    cfe/trunk/test/CodeGenCXX/nrvo.cpp
    cfe/trunk/test/CodeGenCXX/partial-destruction.cpp
    cfe/trunk/test/CodeGenCXX/stack-reuse-miscompile.cpp
    cfe/trunk/test/FixIt/fixit.cpp
    cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
    cfe/trunk/test/Parser/backtrack-off-by-one.cpp
    cfe/trunk/test/SemaCXX/copy-assignment.cpp

Modified: cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp Mon Dec 19 11:58:09 2016
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -o - %s -Wno-return-type-c-linkage | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -o - %s -Wno-return-type-c-linkage -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03
+// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -o - %s -Wno-return-type-c-linkage -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11
 
 // This isn't really testing anything ARM-specific; it's just a convenient
 // 32-bit platform.
@@ -48,7 +49,8 @@ typedef struct {
 TEST(struct_1);
 // CHECK-LABEL: define {{.*}} @return_struct_1()
 // CHECK:   [[RET:%.*]] = alloca [[REC:%.*]], align 4
-// CHECK:   @llvm.memset
+// CHECKv03:   @llvm.memset
+// CHECKv11:   @llvm.memcpy
 // CHECK:   [[CAST_TMP:%.*]] = bitcast [[REC]]* [[RET]] to [[AGG:{ i32, \[2 x i8\], i8, \[1 x i8\], float, float }]]*
 // CHECK:   [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
 // CHECK:   [[FIRST:%.*]] = load i32, i32* [[T0]], align 4

Modified: cfe/trunk/test/CodeGenCXX/destructors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/destructors.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/destructors.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/destructors.cpp Mon Dec 19 11:58:09 2016
@@ -1,11 +1,16 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns > %t
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++03 > %t
 // RUN: FileCheck --check-prefix=CHECK1 --input-file=%t %s
 // RUN: FileCheck --check-prefix=CHECK2 --input-file=%t %s
 // RUN: FileCheck --check-prefix=CHECK3 --input-file=%t %s
-// RUN: FileCheck --check-prefix=CHECK4 --input-file=%t %s
-// RUN: FileCheck --check-prefix=CHECK5 --input-file=%t %s
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++11 > %t2
-// RUN: FileCheck --check-prefix=CHECK6 --input-file=%t2 %s
+// RUN: FileCheck --check-prefixes=CHECK4,CHECK4v03 --input-file=%t %s
+// RUN: FileCheck --check-prefixes=CHECK5,CHECK5v03 --input-file=%t %s
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++11 > %t2
+// RUN: FileCheck --check-prefix=CHECK1    --input-file=%t2 %s
+// RUN: FileCheck --check-prefix=CHECK2v11 --input-file=%t2 %s
+// RUN: FileCheck --check-prefix=CHECK3    --input-file=%t2 %s
+// RUN: FileCheck --check-prefixes=CHECK4,CHECK4v11 --input-file=%t2 %s
+// RUN: FileCheck --check-prefixes=CHECK5,CHECK5v11 --input-file=%t2 %s
+// RUN: FileCheck --check-prefix=CHECK6    --input-file=%t2 %s
 // REQUIRES: asserts
 
 struct A {
@@ -98,6 +103,12 @@ namespace test0 {
 // CHECK2: invoke void @_ZN5test04BaseD2Ev
 // CHECK2:   unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
 
+// In C++11, the destructors are often known not to throw.
+// CHECK2v11-LABEL: @_ZN5test01AD1Ev = alias {{.*}} @_ZN5test01AD2Ev
+// CHECK2v11-LABEL: define void @_ZN5test01AD2Ev(%"struct.test0::A"* %this) unnamed_addr
+// CHECK2v11: call void @_ZN5test06MemberD1Ev
+// CHECK2v11: call void @_ZN5test04BaseD2Ev
+
   struct B : Base, virtual VBase {
     Member M;
     ~B();
@@ -111,6 +122,10 @@ namespace test0 {
 // CHECK2: invoke void @_ZN5test04BaseD2Ev
 // CHECK2:   unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
 
+// CHECK2v11-LABEL: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
+// CHECK2v11: call void @_ZN5test06MemberD1Ev
+// CHECK2v11: call void @_ZN5test04BaseD2Ev
+
 // CHECK2-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
 // CHECK2: invoke void @_ZN5test06MemberD1Ev
 // CHECK2:   unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
@@ -118,6 +133,11 @@ namespace test0 {
 // CHECK2:   unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
 // CHECK2: invoke void @_ZN5test05VBaseD2Ev
 // CHECK2:   unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
+
+// CHECK2v11-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
+// CHECK2v11: call void @_ZN5test06MemberD1Ev
+// CHECK2v11: call void @_ZN5test04BaseD2Ev
+// CHECK2v11: call void @_ZN5test05VBaseD2Ev
 }
 
 // Test base-class aliasing.
@@ -189,19 +209,22 @@ namespace test3 {
   }
 
   // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
-  // CHECK4: invoke void @_ZN5test31BD2Ev(
+  // CHECK4v03: invoke void @_ZN5test31BD2Ev(
+  // CHECK4v11: call   void @_ZN5test31BD2Ev(
   // CHECK4: call void @_ZN5test31AD2Ev(
   // CHECK4: ret void
 
   // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::(anonymous namespace)::D"* %this) unnamed_addr
-  // CHECK4-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
-  // CHECK4: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
+  // CHECK4v03-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+  // CHECK4v03: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
+  // CHECK4v11: call   void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
   // CHECK4: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]]
   // CHECK4: ret void
-  // CHECK4: landingpad { i8*, i32 }
-  // CHECK4-NEXT: cleanup
-  // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]]
-  // CHECK4: resume { i8*, i32 }
+  // CHECK4v03: landingpad { i8*, i32 }
+  // CHECK4v03-NEXT: cleanup
+  // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]]
+  // CHECK4v03: resume { i8*, i32 }
+  // CHECK4v11-NOT: landingpad
 
   // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD1Ev(
   // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
@@ -214,14 +237,15 @@ namespace test3 {
   // CHECK4: ret void
 
   // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
-  // CHECK4-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
-  // CHECK4: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev(
+  // CHECK4v03-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+  // CHECK4v03: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev(
+  // CHECK4v11: call   void @_ZN5test312_GLOBAL__N_11CD2Ev(
   // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]]
   // CHECK4: ret void
-  // CHECK4: landingpad { i8*, i32 }
-  // CHECK4-NEXT: cleanup
-  // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]]
-  // CHECK4: resume { i8*, i32 }
+  // CHECK4v03: landingpad { i8*, i32 }
+  // CHECK4v03-NEXT: cleanup
+  // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]]
+  // CHECK4v03: resume { i8*, i32 }
 
   // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev(
   // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
@@ -282,8 +306,8 @@ namespace test5 {
 
   // CHECK5-LABEL: define void @_ZN5test53fooEv()
   // CHECK5:      [[ELEMS:%.*]] = alloca [5 x [[A:%.*]]], align
-  // CHECK5-NEXT: [[EXN:%.*]] = alloca i8*
-  // CHECK5-NEXT: [[SEL:%.*]] = alloca i32
+  // CHECK5v03-NEXT: [[EXN:%.*]] = alloca i8*
+  // CHECK5v03-NEXT: [[SEL:%.*]] = alloca i32
   // CHECK5-NEXT: [[PELEMS:%.*]] = bitcast [5 x [[A]]]* [[ELEMS]] to i8*
   // CHECK5-NEXT: call void @llvm.lifetime.start(i64 5, i8* [[PELEMS]])
   // CHECK5-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [5 x [[A]]], [5 x [[A]]]* [[ELEMS]], i32 0, i32 0
@@ -291,19 +315,22 @@ namespace test5 {
   // CHECK5-NEXT: br label
   // CHECK5:      [[POST:%.*]] = phi [[A]]* [ [[END]], {{%.*}} ], [ [[ELT:%.*]], {{%.*}} ]
   // CHECK5-NEXT: [[ELT]] = getelementptr inbounds [[A]], [[A]]* [[POST]], i64 -1
-  // CHECK5-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[ELT]])
+  // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[ELT]])
+  // CHECK5v11-NEXT: call   void @_ZN5test51AD1Ev([[A]]* [[ELT]])
   // CHECK5:      [[T0:%.*]] = icmp eq [[A]]* [[ELT]], [[BEGIN]]
   // CHECK5-NEXT: br i1 [[T0]],
   // CHECK5:      call void @llvm.lifetime.end
   // CHECK5-NEXT: ret void
   // lpad
-  // CHECK5:      [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]]
-  // CHECK5-NEXT: br i1 [[EMPTY]]
-  // CHECK5:      [[AFTER:%.*]] = phi [[A]]* [ [[ELT]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
-  // CHECK5-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1
-  // CHECK5-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[CUR]])
-  // CHECK5:      [[DONE:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]]
-  // CHECK5-NEXT: br i1 [[DONE]],
+  // CHECK5v03:      [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]]
+  // CHECK5v03-NEXT: br i1 [[EMPTY]]
+  // CHECK5v03:      [[AFTER:%.*]] = phi [[A]]* [ [[ELT]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
+  // CHECK5v03-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1
+  // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[CUR]])
+  // CHECK5v03:      [[DONE:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]]
+  // CHECK5v03-NEXT: br i1 [[DONE]],
+  // CHECK5v11-NOT: landingpad
+  // CHECK5v11:   }
   void foo() {
     A elems[5];
   }
@@ -334,25 +361,34 @@ namespace test6 {
   C::~C() { opaque(); }
   // CHECK5-LABEL: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr
   // CHECK5:   invoke void @_ZN5test66opaqueEv
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61BILj1EED2Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61BILj1EED2Ev
+  // CHECK5v11:   call   void @_ZN5test61AD1Ev
+  // CHECK5v11:   call   void @_ZN5test61AD1Ev
+  // CHECK5v11:   call   void @_ZN5test61AD1Ev
+  // CHECK5v11:   call   void @_ZN5test61BILj1EED2Ev
   // CHECK5:   call void @_ZN5test61BILj0EED2Ev
   // CHECK5:   ret void
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61AD1Ev
-  // CHECK5:   invoke void @_ZN5test61BILj1EED2Ev
-  // CHECK5:   invoke void @_ZN5test61BILj0EED2Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61AD1Ev
+  // CHECK5v03:   invoke void @_ZN5test61BILj1EED2Ev
+  // CHECK5v03:   invoke void @_ZN5test61BILj0EED2Ev
 
   // CHECK5-LABEL: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
-  // CHECK5:   invoke void @_ZN5test61CD2Ev
-  // CHECK5:   invoke void @_ZN5test61BILj3EED2Ev
-  // CHECK5:   call void @_ZN5test61BILj2EED2Ev
-  // CHECK5:   ret void
-  // CHECK5:   invoke void @_ZN5test61BILj3EED2Ev
-  // CHECK5:   invoke void @_ZN5test61BILj2EED2Ev
+  // CHECK5v03:   invoke void @_ZN5test61CD2Ev
+  // CHECK5v03:   invoke void @_ZN5test61BILj3EED2Ev
+  // CHECK5v03:   call void @_ZN5test61BILj2EED2Ev
+  // CHECK5v03:   ret void
+  // CHECK5v03:   invoke void @_ZN5test61BILj3EED2Ev
+  // CHECK5v03:   invoke void @_ZN5test61BILj2EED2Ev
+
+  // CHECK5v11:   call void @_ZN5test61CD2Ev
+  // CHECK5v11:   call void @_ZN5test61BILj3EED2Ev
+  // CHECK5v11:   call void @_ZN5test61BILj2EED2Ev
+  // CHECK5v11:   ret void
 }
 
 // PR 9197
@@ -369,7 +405,8 @@ namespace test7 {
 
   // Verify that this doesn't get emitted as an alias
   // CHECK5-LABEL: define void @_ZN5test71BD2Ev(
-  // CHECK5:   invoke void @_ZN5test71DD1Ev(
+  // CHECK5v03:   invoke void @_ZN5test71DD1Ev(
+  // CHECK5v11:   call   void @_ZN5test71DD1Ev(
   // CHECK5:   call void @_ZN5test71AD2Ev(
   B::~B() {}
 }
@@ -394,7 +431,8 @@ namespace test8 {
   // CHECK5:      call void @_ZN5test81AC1Ev([[A]]* [[X]])
   // CHECK5-NEXT: br label
   // CHECK5:      invoke void @_ZN5test81AC1Ev([[A]]* [[Y]])
-  // CHECK5:      invoke void @_ZN5test81AD1Ev([[A]]* [[Y]])
+  // CHECK5v03:   invoke void @_ZN5test81AD1Ev([[A]]* [[Y]])
+  // CHECK5v11:   call   void @_ZN5test81AD1Ev([[A]]* [[Y]])
   // CHECK5-NOT:  switch
   // CHECK5:      invoke void @_ZN5test83dieEv()
   // CHECK5:      unreachable

Modified: cfe/trunk/test/CodeGenCXX/global-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/global-init.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/global-init.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/global-init.cpp Mon Dec 19 11:58:09 2016
@@ -1,7 +1,12 @@
-// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm -fexceptions %s -o - |FileCheck %s
-// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - |FileCheck -check-prefix CHECK-NOEXC %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm -fexceptions %s -o - -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm -fexceptions %s -o - -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - -std=c++03 | FileCheck -check-prefix CHECK-NOEXC %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - -std=c++11 | FileCheck -check-prefix CHECK-NOEXC %s
 // RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm \
-// RUN:     -momit-leaf-frame-pointer -mdisable-fp-elim %s -o - \
+// RUN:     -momit-leaf-frame-pointer -mdisable-fp-elim %s -o - -std=c++03 \
+// RUN:   | FileCheck -check-prefix CHECK-FP %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm \
+// RUN:     -momit-leaf-frame-pointer -mdisable-fp-elim %s -o - -std=c++11 \
 // RUN:   | FileCheck -check-prefix CHECK-FP %s
 
 struct A {
@@ -170,7 +175,8 @@ namespace test7 {
   const B &b2 = B();
   const int b3 = B().n;
 
-  // CHECK-NOT: @_ZN5test7L2c1E
+  // CHECKv03-NOT: @_ZN5test7L2c1E
+  // CHECKv11:     @_ZN5test7L2c1E
   // CHECK: @_ZN5test7L2c2E
   // CHECK-NOT: @_ZN5test7L2c3E
   // CHECK: @_ZN5test7L2c4E

Modified: cfe/trunk/test/CodeGenCXX/nrvo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/nrvo.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/nrvo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/nrvo.cpp Mon Dec 19 11:58:09 2016
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -o - %s | FileCheck --check-prefix=CHECK-EH %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -std=c++03 -o - %s | FileCheck --check-prefixes=CHECK-EH,CHECK-EH-03 %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -std=c++11 -o - %s | FileCheck --check-prefixes=CHECK-EH,CHECK-EH-11 %s
 
 // Test code generation for the named return value optimization.
 class X {
@@ -91,16 +92,18 @@ X test2(bool B) {
   // -> %eh.cleanup
 
   // %lpad1: landing pad for return copy ctors, EH cleanup for 'y'
-  // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev
+  // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev
   // -> %eh.cleanup, %terminate.lpad
+  // CHECK-EH-11: call   {{.*}} @_ZN1XD1Ev
 
   // %if.end: returning 'y'
   // CHECK-EH: invoke {{.*}} @_ZN1XC1ERKS_
   // -> %cleanup, %lpad1
 
   // %cleanup: normal cleanup for 'y'
-  // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev
+  // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev
   // -> %invoke.cont11, %lpad
+  // CHECK-EH-11: call   {{.*}} @_ZN1XD1Ev
 
   // %invoke.cont11: normal cleanup for 'x'
   // CHECK-EH:      call void @llvm.lifetime.end
@@ -109,19 +112,20 @@ X test2(bool B) {
   // CHECK-EH-NEXT: ret void
 
   // %eh.cleanup:  EH cleanup for 'x'
-  // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev
+  // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev
   // -> %invoke.cont17, %terminate.lpad
+  // CHECK-EH-11: call   {{.*}} @_ZN1XD1Ev
 
   // %invoke.cont17: rethrow block for %eh.cleanup.
   // This really should be elsewhere in the function.
   // CHECK-EH:      resume { i8*, i32 }
 
   // %terminate.lpad: terminate landing pad.
-  // CHECK-EH:      [[T0:%.*]] = landingpad { i8*, i32 }
-  // CHECK-EH-NEXT:   catch i8* null
-  // CHECK-EH-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0
-  // CHECK-EH-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]]
-  // CHECK-EH-NEXT: unreachable
+  // CHECK-EH-03:      [[T0:%.*]] = landingpad { i8*, i32 }
+  // CHECK-EH-03-NEXT:   catch i8* null
+  // CHECK-EH-03-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0
+  // CHECK-EH-03-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]]
+  // CHECK-EH-03-NEXT: unreachable
 
 }
 
@@ -217,4 +221,4 @@ Y<int> test9() {
 // CHECK-LABEL: define linkonce_odr void @_ZN1YIiE1fEv
 // CHECK: tail call {{.*}} @_ZN1YIiEC1Ev
 
-// CHECK-EH: attributes [[NR_NUW]] = { noreturn nounwind }
+// CHECK-EH-03: attributes [[NR_NUW]] = { noreturn nounwind }

Modified: cfe/trunk/test/CodeGenCXX/partial-destruction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/partial-destruction.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/partial-destruction.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/partial-destruction.cpp Mon Dec 19 11:58:09 2016
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11
 
 // Test IR generation for partial destruction of aggregates.
 
@@ -45,7 +46,8 @@ namespace test0 {
   // CHECK-NEXT: br label
   // CHECK:      [[ED_AFTER:%.*]] = phi [[A]]* [ [[ED_END]], {{%.*}} ], [ [[ED_CUR:%.*]], {{%.*}} ]
   // CHECK-NEXT: [[ED_CUR]] = getelementptr inbounds [[A]], [[A]]* [[ED_AFTER]], i64 -1
-  // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]])
+  // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]])
+  // CHECKv11-NEXT: call   void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]])
   // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[ED_CUR]], [[ED_BEGIN]]
   // CHECK-NEXT: br i1 [[T0]],
   // CHECK:      ret void
@@ -58,7 +60,8 @@ namespace test0 {
   // CHECK-NEXT: br i1 [[T0]],
   // CHECK:      [[E_AFTER:%.*]] = phi [[A]]* [ [[PARTIAL_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
   // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1
-  // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
+  // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
+  // CHECKv11-NEXT: call   void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
   // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E_BEGIN]]
   // CHECK-NEXT: br i1 [[T0]],
 
@@ -73,20 +76,21 @@ namespace test0 {
   // FIXME: There's some really bad block ordering here which causes
   // the partial destroy for the primary normal destructor to fall
   // within the primary EH destructor.
-  // CHECK:      landingpad { i8*, i32 }
-  // CHECK-NEXT:   cleanup
-  // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[ED_BEGIN]], [[ED_CUR]]
-  // CHECK-NEXT: br i1 [[T0]]
-  // CHECK:      [[EDD_AFTER:%.*]] = phi [[A]]* [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ]
-  // CHECK-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], [[A]]* [[EDD_AFTER]], i64 -1
-  // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[EDD_CUR]])
-  // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[EDD_CUR]], [[ED_BEGIN]]
-  // CHECK-NEXT: br i1 [[T0]]
+  // CHECKv03:      landingpad { i8*, i32 }
+  // CHECKv03-NEXT:   cleanup
+  // CHECKv03:      [[T0:%.*]] = icmp eq [[A]]* [[ED_BEGIN]], [[ED_CUR]]
+  // CHECKv03-NEXT: br i1 [[T0]]
+  // CHECKv03:      [[EDD_AFTER:%.*]] = phi [[A]]* [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ]
+  // CHECKv03-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], [[A]]* [[EDD_AFTER]], i64 -1
+  // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[EDD_CUR]])
+  // CHECKv03:      [[T0:%.*]] = icmp eq [[A]]* [[EDD_CUR]], [[ED_BEGIN]]
+  // CHECKv03-NEXT: br i1 [[T0]]
 
   // Back to the primary EH destructor.
   // CHECK:      [[E_AFTER:%.*]] = phi [[A]]* [ [[E_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
   // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1
-  // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
+  // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
+  // CHECKv11-NEXT: call   void @_ZN5test01AD1Ev([[A]]* [[E_CUR]])
   // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E0]]
   // CHECK-NEXT: br i1 [[T0]],
 
@@ -120,8 +124,10 @@ namespace test1 {
   // CHECK-NEXT:   cleanup
   // CHECK:      landingpad { i8*, i32 }
   // CHECK-NEXT:   cleanup
-  // CHECK:      invoke void @_ZN5test11AD1Ev([[A]]* [[Y]])
-  // CHECK:      invoke void @_ZN5test11AD1Ev([[A]]* [[X]])
+  // CHECKv03:      invoke void @_ZN5test11AD1Ev([[A]]* [[Y]])
+  // CHECKv03:      invoke void @_ZN5test11AD1Ev([[A]]* [[X]])
+  // CHECKv11:      call   void @_ZN5test11AD1Ev([[A]]* [[Y]])
+  // CHECKv11:      call   void @_ZN5test11AD1Ev([[A]]* [[X]])
 }
 
 namespace test2 {
@@ -153,7 +159,8 @@ namespace test2 {
     // CHECK-NEXT: br i1 [[EMPTY]],
     // CHECK:      [[PAST:%.*]] = phi [[A]]* [ [[CUR]], {{%.*}} ], [ [[DEL:%.*]], {{%.*}} ]
     // CHECK-NEXT: [[DEL]] = getelementptr inbounds [[A]], [[A]]* [[PAST]], i64 -1
-    // CHECK-NEXT: invoke void @_ZN5test21AD1Ev([[A]]* [[DEL]])
+    // CHECKv03-NEXT: invoke void @_ZN5test21AD1Ev([[A]]* [[DEL]])
+    // CHECKv11-NEXT: call   void @_ZN5test21AD1Ev([[A]]* [[DEL]])
     // CHECK:      [[T0:%.*]] = icmp eq [[A]]* [[DEL]], [[BEGIN]]
     // CHECK-NEXT: br i1 [[T0]],
   }

Modified: cfe/trunk/test/CodeGenCXX/stack-reuse-miscompile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/stack-reuse-miscompile.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/stack-reuse-miscompile.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/stack-reuse-miscompile.cpp Mon Dec 19 11:58:09 2016
@@ -1,4 +1,4 @@
-// RUN: %clang -S -target armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -mllvm -disable-llvm-optzns -S %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -disable-llvm-optzns -S -std=c++03 %s -o - | FileCheck %s
 
 // This test should not to generate llvm.lifetime.start/llvm.lifetime.end for
 // f function because all temporary objects in this function are used for the

Modified: cfe/trunk/test/FixIt/fixit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit.cpp (original)
+++ cfe/trunk/test/FixIt/fixit.cpp Mon Dec 19 11:58:09 2016
@@ -1,8 +1,12 @@
-// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ %s
+// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ -std=c++98 %s
+// RUN: cp %s %t-98
+// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ -std=c++98 %t-98
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ -std=c++98 %t-98
 // RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ -std=c++11 %s 2>&1 | FileCheck %s
-// RUN: cp %s %t
-// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ %t
-// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ %t
+// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ -std=c++11 %s
+// RUN: cp %s %t-11
+// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ -std=c++11 %t-11
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ -std=c++11 %t-11
 
 /* This is a test of the various code modification hints that are
    provided as part of warning or extension diagnostics. All of the
@@ -21,7 +25,10 @@ static void C1::g() { } // expected-erro
 
 template<int Value> struct CT { template<typename> struct Inner; }; // expected-note{{previous use is here}}
 
+// In C++11 this gets 'expected unqualified-id' which fixit can't fix.
+#if __cplusplus < 201103L
 CT<10 >> 2> ct; // expected-warning{{require parentheses}}
+#endif
 
 class C3 {
 public:
@@ -41,7 +48,11 @@ protected:
 };
 
 class B : public A {
+#if __cplusplus >= 201103L
+  A::foo; // expected-error{{ISO C++11 does not allow access declarations}}
+#else
   A::foo; // expected-warning{{access declarations are deprecated}}
+#endif
 };
 
 void f() throw(); // expected-note{{previous}}
@@ -285,8 +296,10 @@ namespace greatergreater {
     void (*p)() = &t<int>;
     (void)(&t<int>==p); // expected-error {{use '> ='}}
     (void)(&t<int>>=p); // expected-error {{use '> >'}}
+#if __cplusplus < 201103L
     (void)(&t<S<int>>>=p); // expected-error {{use '> >'}}
     (Shr)&t<S<int>>>>=p; // expected-error {{use '> >'}}
+#endif
 
     // FIXME: We correct this to '&t<int> > >= p;' not '&t<int> >>= p;'
     //(Shr)&t<int>>>=p;

Modified: cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp Mon Dec 19 11:58:09 2016
@@ -1,8 +1,13 @@
 // RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
 
 void foo() {
 }
 
+#if __cplusplus >= 201103L
+// expected-note at +2 4 {{declared here}}
+#endif
 bool foobool(int argc) {
   return argc;
 }
@@ -50,6 +55,9 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
 // expected-error at +3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
 // expected-error at +2 2 {{expression is not an integral constant expression}}
@@ -62,7 +70,11 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
 
-// expected-error at +2 2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 2 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++)
@@ -110,11 +122,17 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 #pragma omp target
 #pragma omp teams distribute collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
+#if __cplusplus >= 201103L
+// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 {{expression is not an integral constant expression}}
 // expected-error at +3 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
 // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -128,7 +146,11 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
-// expected-error at +2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++)

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp Mon Dec 19 11:58:09 2016
@@ -1,8 +1,13 @@
 // RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
 
 void foo() {
 }
 
+#if __cplusplus >= 201103L
+// expected-note at +2 4 {{declared here}}
+#endif
 bool foobool(int argc) {
   return argc;
 }
@@ -50,6 +55,9 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute parallel for', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
 // expected-error at +3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
 // expected-error at +2 2 {{expression is not an integral constant expression}}
@@ -62,7 +70,11 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
 
-// expected-error at +2 2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 2 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++)
@@ -110,11 +122,17 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute parallel for', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
+#if __cplusplus >= 201103L
+// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 {{expression is not an integral constant expression}}
 // expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
 // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -128,7 +146,11 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
-// expected-error at +2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++)

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp Mon Dec 19 11:58:09 2016
@@ -1,8 +1,13 @@
 // RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
 
 void foo() {
 }
 
+#if __cplusplus >= 201103L
+// expected-note at +2 4 {{declared here}}
+#endif
 bool foobool(int argc) {
   return argc;
 }
@@ -50,6 +55,9 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute parallel for simd', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
 // expected-error at +3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
 // expected-error at +2 2 {{expression is not an integral constant expression}}
@@ -62,7 +70,11 @@ T tmain(T argc, S **argv) { //expected-n
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
 
-// expected-error at +2 2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 2 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++)
@@ -110,11 +122,17 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute parallel for simd', but found only 1}}
 
+#if __cplusplus >= 201103L
+// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
+#if __cplusplus >= 201103L
+// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
+#endif
 // expected-error at +4 {{expression is not an integral constant expression}}
 // expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
 // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -128,7 +146,11 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
 
-// expected-error at +2 {{expression is not an integral constant expression}}
+#if __cplusplus >= 201103L
+// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
+#else
+// expected-error at +3 {{expression is not an integral constant expression}}
+#endif
 #pragma omp target
 #pragma omp teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++)

Modified: cfe/trunk/test/Parser/backtrack-off-by-one.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/backtrack-off-by-one.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/Parser/backtrack-off-by-one.cpp (original)
+++ cfe/trunk/test/Parser/backtrack-off-by-one.cpp Mon Dec 19 11:58:09 2016
@@ -1,4 +1,6 @@
 // RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify %s -std=c++98
+// RUN: %clang_cc1 -verify %s -std=c++11
 
 // PR25946
 // We had an off-by-one error in an assertion when annotating A<int> below.  Our
@@ -10,8 +12,10 @@ template <typename T> class A {};
 
 // expected-error at +1 {{expected '{' after base class list}}
 template <typename T> class B : T // not ',' or '{'
-// expected-error at +3 {{C++ requires a type specifier for all declarations}}
-// expected-error at +2 {{expected ';' after top level declarator}}
+#if __cplusplus < 201103L
+// expected-error at +4 {{expected ';' after top level declarator}}
+#endif
+// expected-error at +2 {{C++ requires a type specifier for all declarations}}
 // expected-error at +1 {{expected ';' after class}}
 A<int> {
 };

Modified: cfe/trunk/test/SemaCXX/copy-assignment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/copy-assignment.cpp?rev=290120&r1=290119&r2=290120&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/copy-assignment.cpp (original)
+++ cfe/trunk/test/SemaCXX/copy-assignment.cpp Mon Dec 19 11:58:09 2016
@@ -1,4 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+
+#if __cplusplus >= 201103L
+// expected-note at +3 2 {{candidate constructor}}
+// expected-note at +2 {{passing argument to parameter here}}
+#endif
 struct A {
 };
 
@@ -7,6 +14,9 @@ struct ConvertibleToA {
 };
 
 struct ConvertibleToConstA {
+#if __cplusplus >= 201103L
+// expected-note at +2 {{candidate function}}
+#endif
   operator const A();
 };
 
@@ -69,6 +79,9 @@ void test() {
   na = a;
   na = constA;
   na = convertibleToA;
+#if __cplusplus >= 201103L
+// expected-error at +2 {{no viable conversion}}
+#endif
   na = convertibleToConstA;
   na += a; // expected-error{{no viable overloaded '+='}}
 




More information about the cfe-commits mailing list