================ @@ -21,6 +21,88 @@ using namespace clang; using namespace clang::CIRGen; +/// Checks whether the given constructor is a valid subject for the +/// complete-to-base constructor delgation optimization, i.e. emitting the +/// complete constructor as a simple call to the base constructor. ---------------- andykaylor wrote:
Update: I was misunderstanding what `isDelegatingConstructor()` constructor meant. It's not the relevant case here. This function is only called for the C1 constructor (ctorType == Ctor_Complete) and it returns `true` for the initial test case here, causing us to emit the constructor as a call to the C2 constructor. When I add a variadic constructor (which I will in my next update to this PR), this function returns `false` and we emit the C1 constructor (but not the C2 constructor). https://github.com/llvm/llvm-project/pull/143639 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits