================
@@ -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:
Hopefully/presumably this isn't a "delegating" ctor - the base ctor called is
really a subobject (well, base subobject) initializer...
Could you double check that this case doesn't trip any of the code changes you
made in this patch?
https://github.com/llvm/llvm-project/pull/218807
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits