diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-17 20:05:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-17 20:05:37 +0000 |
commit | bc491203c77d74b4190d0de4f2b047d731c0ddb2 (patch) | |
tree | 30e6e209c375d143ac7127727bf114c59bfe9bc6 /clang/lib/AST/DeclCXX.cpp | |
parent | e6c6a945ca93432c930cf255dbf55069377d4426 (diff) | |
download | bcm5719-llvm-bc491203c77d74b4190d0de4f2b047d731c0ddb2.tar.gz bcm5719-llvm-bc491203c77d74b4190d0de4f2b047d731c0ddb2.zip |
Add an explicit derived class of FunctionDecl to model deduction guides rather
than just treating them as FunctionDecls with a funny name.
No functionality change intended.
llvm-svn: 295491
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index a9db65a5151..fdfd6c07059 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -1472,6 +1472,23 @@ bool CXXRecordDecl::mayBeAbstract() const { return false; } +void CXXDeductionGuideDecl::anchor() { } + +CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create( + ASTContext &C, DeclContext *DC, SourceLocation StartLoc, bool IsExplicit, + const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, + SourceLocation EndLocation) { + return new (C, DC) CXXDeductionGuideDecl(C, DC, StartLoc, IsExplicit, + NameInfo, T, TInfo, EndLocation); +} + +CXXDeductionGuideDecl *CXXDeductionGuideDecl::CreateDeserialized(ASTContext &C, + unsigned ID) { + return new (C, ID) CXXDeductionGuideDecl(C, nullptr, SourceLocation(), false, + DeclarationNameInfo(), QualType(), + nullptr, SourceLocation()); +} + void CXXMethodDecl::anchor() { } bool CXXMethodDecl::isStatic() const { |