================
@@ -0,0 +1,77 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions 
-fcxx-exceptions -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions 
-fcxx-exceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM,LLVMCIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions 
-fcxx-exceptions -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM,OGCG
+
+struct Ctor {
+  Ctor();
+};
+
+struct FromCtor {
+  FromCtor(const Ctor&);
+};
+
+void side_effect();
+void side_effect2();
+
+struct Base {
+  Base();
+};
+
+struct HasThings : Base {
+  FromCtor ct;
+
+  HasThings(const Ctor &c) try : ct(c) { side_effect(); } catch (...) {
+    side_effect2();
+  }
----------------
erichkeane wrote:

oof, you're right! I have no idea how that got that way, I'll fix it.

But yes, 'try' body ctors are a very odd syntax.

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

Reply via email to