================
@@ -0,0 +1,138 @@
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: cir-opt %t.cir -cir-flatten-cfg -o %t-flat.cir
+// RUN: FileCheck --input-file=%t-flat.cir %s -check-prefix=CIR-FLAT
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
+
+void mayThrow();
+
+struct S {
+  S();
+  ~S();
+};
+
+void test_catch_all_with_cleanup() {
+  try {
+    S s;
+    mayThrow();
+  } catch (...) {
----------------
andykaylor wrote:

Good catch. We do have a problem with that case, but it's a different problem. 
It doesn't confuse `traceToEhInitiate` but we are failing to put the catch-all 
specifier on the landing pad. Since it's an unrelated fix, I'd like to address 
it in a separate PR.

https://github.com/llvm/llvm-project/pull/190233
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to