diff options
author | antangelo <contact@antangelo.com> | 2025-01-27 18:59:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-27 18:59:12 -0500 |
commit | f94c481543bdd3b11a668ad78d46593cf974788f (patch) | |
tree | c7a5011911380e9d4692400f7c863f3be73d43cf /clang/lib/Serialization/ASTWriterDecl.cpp | |
parent | a34159f85ee01c197cc9d938bd1fc40c4c7dba51 (diff) | |
download | llvm-f94c481543bdd3b11a668ad78d46593cf974788f.zip llvm-f94c481543bdd3b11a668ad78d46593cf974788f.tar.gz llvm-f94c481543bdd3b11a668ad78d46593cf974788f.tar.bz2 |
[clang] Track source deduction guide for alias template deduction guides (#123875)
For deduction guides generated from alias template CTAD, store the
deduction guide they were originated from. The source kind is also
maintained for future expansion in CTAD from inherited constructors.
This tracking is required to determine whether an alias template already
has a deduction guide corresponding to some deduction guide on the
original template, in order to support deduction guides for the alias
from deduction guides declared after the initial usage.
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 8b9ba04..fa2294d 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -846,6 +846,9 @@ void ASTDeclWriter::VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D) { Record.AddDeclRef(D->Ctor); VisitFunctionDecl(D); Record.push_back(static_cast<unsigned char>(D->getDeductionCandidateKind())); + Record.AddDeclRef(D->getSourceDeductionGuide()); + Record.push_back( + static_cast<unsigned char>(D->getSourceDeductionGuideKind())); Code = serialization::DECL_CXX_DEDUCTION_GUIDE; } |