[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 25 09:47:49 PST 2024
================
@@ -2010,6 +2032,25 @@ class CXXDeductionGuideDecl : public FunctionDecl {
/// this is an implicit deduction guide.
CXXConstructorDecl *getCorrespondingConstructor() const { return Ctor; }
+ /// Get the deduction guide from which this deduction guide was generated,
+ /// if it was generated as part of alias template deduction or from an
+ /// inherited constructor.
+ const CXXDeductionGuideDecl *getSourceDeductionGuide() const {
+ return SourceDeductionGuide.getPointer();
+ }
+
+ void setSourceDeductionGuide(CXXDeductionGuideDecl *DG) {
+ SourceDeductionGuide.setPointer(DG);
----------------
erichkeane wrote:
Do we want to assert for `!DG`?
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list