================
@@ -27,6 +27,39 @@ struct E {
   constexpr E(){};
 } TestE;
 
+// Defined delegating constructor where delegated constructor is not defined
+// should not emit full debug info.
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: 
"Delegating"{{.*}}flags: DIFlagFwdDecl
+struct Delegating {
+  Delegating() : Delegating(42) {}
+  Delegating(int);
+} TestDelegating;
+
+// Defined delegating constructor where delegated constructor is defined should
+// emit full debug info.
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: 
"DelegatingToDefined"{{.*}}DIFlagTypePassByValue
+struct DelegatingToDefined {
+  DelegatingToDefined() : DelegatingToDefined(42) {}
+  DelegatingToDefined(int) {}
+} TestDelegatingToDefined;
+
+// Defined out-of-line delegating constructor where delegated constructor is
+// defined should emit full debug info.
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: 
"DelegatingOutOfLine"{{.*}}DIFlagTypePassByValue
+struct DelegatingOutOfLine {
+  DelegatingOutOfLine();
+  DelegatingOutOfLine(int) {}
+};
+DelegatingOutOfLine d;
+DelegatingOutOfLine::DelegatingOutOfLine() : DelegatingOutOfLine(42) {}
+
+// Defined delegating constructor where delegated constructor is from a base
+// class should emit full debug info.
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: 
"DelegatingToBaseClass"{{.*}}DIFlagTypePassByValue
+struct DelegatingToBaseClass : public Delegating {
+  DelegatingToBaseClass() : Delegating(42) {}
+} TestDelegatingToBaseClass;
+
----------------
dwblaikie wrote:

Yeah, I'd probably be inclined to skip this test, or rename it - since this 
isn't a delegating ctor case, as far as the language is concerned/used the term.

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

Reply via email to