Author: lcharles Date: Mon Feb 13 11:56:30 2017 New Revision: 294972 URL: http://llvm.org/viewvc/llvm-project?rev=294972&view=rev Log: [Test] Make Lit tests C++11 compatible - nounwind noexcept
C++11 destructors are nothrow by default. Differential Revision: https://reviews.llvm.org/D29859 Modified: cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp cfe/trunk/test/Index/comment-cplus-decls.cpp Modified: cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp?rev=294972&r1=294971&r2=294972&view=diff ============================================================================== --- cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp (original) +++ cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp Mon Feb 13 11:56:30 2017 @@ -1,10 +1,12 @@ // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 -std=c++11 %s -o - | FileCheck %s // Check the line numbers for cleanup code with EH in combination with // simple return expressions. // CHECK: define {{.*}}foo -// CHECK: call void @_ZN1CD1Ev(%class.C* {{.*}}), !dbg ![[RET:[0-9]+]] +// CHECK: call void @_ZN1CD1Ev(%class.C* {{.*}}){{( #[0-9])?}}, !dbg ![[RET:[0-9]+]] // CHECK: ret i32 0, !dbg ![[RET]] // CHECK: define {{.*}}bar Modified: cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp?rev=294972&r1=294971&r2=294972&view=diff ============================================================================== --- cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp (original) +++ cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp Mon Feb 13 11:56:30 2017 @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s // The landing pad should have the line number of the closing brace of the function. // rdar://problem/13888152 // CHECK: ret i32 Modified: cfe/trunk/test/Index/comment-cplus-decls.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-cplus-decls.cpp?rev=294972&r1=294971&r2=294972&view=diff ============================================================================== --- cfe/trunk/test/Index/comment-cplus-decls.cpp (original) +++ cfe/trunk/test/Index/comment-cplus-decls.cpp Mon Feb 13 11:56:30 2017 @@ -2,9 +2,15 @@ // RUN: mkdir %t // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out // RUN: FileCheck %s < %t/out +// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 -std=c++98 %s > %t/98 +// RUN: FileCheck %s < %t/98 +// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 -std=c++11 %s > %t/11 +// RUN: FileCheck %s < %t/11 // Ensure that XML we generate is not invalid. // RUN: FileCheck %s -check-prefix=WRONG < %t/out +// RUN: FileCheck %s -check-prefix=WRONG < %t/98 +// RUN: FileCheck %s -check-prefix=WRONG < %t/11 // WRONG-NOT: CommentXMLInvalid // rdar://12378714 @@ -42,7 +48,7 @@ protected: // CHECK: <Declaration>class Test {}</Declaration> // CHECK: <Declaration>Test() : reserved(new Test::data()) {}</Declaration> // CHECK: <Declaration>unsigned int getID() const</Declaration> -// CHECK: <Declaration>~Test()</Declaration> +// CHECK: <Declaration>~Test(){{( noexcept)?}}</Declaration> // CHECK: <Declaration>Test::data *reserved</Declaration> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits