]> granicus.if.org Git - clang/commitdiff
[NFC] Relaxed regression tests for PR42665
authorMarco Antognini <marco.antognini@arm.com>
Mon, 22 Jul 2019 14:47:36 +0000 (14:47 +0000)
committerMarco Antognini <marco.antognini@arm.com>
Mon, 22 Jul 2019 14:47:36 +0000 (14:47 +0000)
Following up on the buildbot failures, this commits relaxes some tests:
instead of checking for specific IR output, it now ensures that the
underlying issue (the crash), and only that, doesn't happen.

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

test/CodeGenCXX/PR42665.cpp

index 4a460cfa10788491d95d24d77fb3421fc1dfa6d6..99e180171a3e645af3684572d51a5b31c4f173cb 100644 (file)
@@ -1,7 +1,8 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -std=c++17 -O0 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -std=c++17 -O0 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %itanium_abi_triple
+// RUN: %clang_cc1 -std=c++17 -O0 %s -emit-llvm -o /dev/null -verify -triple %ms_abi_triple
 
 // Minimal reproducer for PR42665.
+// expected-no-diagnostics
 
 struct Foo {
   Foo() = default;
@@ -31,31 +32,3 @@ void foobar() {
   d(f); // Invoke virtual destructor of Foo through d.
 } // p's destructor is invoked.
 
-// Regexes are used to handle both kind of mangling.
-//
-// CHECK-LABEL: define linkonce_odr{{( dso_local)?}} void @{{.*deleter.*Foo.*}}(%struct.Foo* dereferenceable({{[0-9]+}})
-// CHECK-SAME: [[T:%.*]])
-// CHECK: [[T_ADDR:%.*]] = alloca %struct.Foo*
-// CHECK: store %struct.Foo* [[T]], %struct.Foo** [[T_ADDR]]
-// CHECK: [[R0:%.*]] = load %struct.Foo*, %struct.Foo** [[T_ADDR]]
-// CHECK: [[R1:%.*]] = bitcast %struct.Foo* [[R0]] to [[TYPE:.*struct\.Foo.*]]***
-// CHECK: [[VTABLE:%.*]] = load [[TYPE]]**, [[TYPE]]*** [[R1]]
-// CHECK: [[VFUN:%.*]] = getelementptr inbounds [[TYPE]]*, [[TYPE]]** [[VTABLE]], i64 0
-// CHECK: [[DTOR:%.*]] = load [[TYPE]]*, [[TYPE]]** [[VFUN]]
-// CHECK: call {{(void|i8\*)}} [[DTOR]](%struct.Foo* [[R0]]
-//
-// CHECK-LABEL: define{{( dso_local)?}} void @{{.*foobar.*}}()
-// CHECK: [[P:%.*]] = alloca %struct.Pair
-// CHECK: [[F:%.*]] = alloca %struct.Foo*
-// CHECK: [[D:%.*]] = alloca [[TYPE:void \(%struct.Foo\*\)]]**
-// CHECK: call void @{{.*make_pair.*}}(%struct.Pair* sret [[P]])
-// CHECK: [[FIRST:%.*]] = getelementptr inbounds %struct.Pair, %struct.Pair* [[P]], i32 0, i32 0
-// CHECK: store %struct.Foo* [[FIRST]], %struct.Foo** [[F]]
-// CHECK: [[SECOND:%.*]] = getelementptr inbounds %struct.Pair, %struct.Pair* [[P]], i32 0, i32 1
-// CHECK: store void (%struct.Foo*)** [[SECOND]], [[TYPE]]*** [[D]]
-// CHECK: [[R0:%.*]] = load [[TYPE]]**, [[TYPE]]*** [[D]]
-// CHECK: [[R1:%.*]] = load [[TYPE]]*, [[TYPE]]** [[R0]]
-// CHECK: [[R2:%.*]] = load %struct.Foo*, %struct.Foo** [[F]]
-// CHECK: call void [[R1]](%struct.Foo* dereferenceable({{[0-9]+}}) [[R2]])
-// CHECK: call void @{{.*Pair.*Foo.*}}(%struct.Pair* [[P]])
-