diff options
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 1860b948d60..8563416a480 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -2250,37 +2250,15 @@ SourceRange UsingDecl::getSourceRange() const { return SourceRange(Begin, getNameInfo().getEndLoc()); } -void UsingPackDecl::anchor() { } - -UsingPackDecl *UsingPackDecl::Create(ASTContext &C, DeclContext *DC, - NamedDecl *InstantiatedFrom, - ArrayRef<NamedDecl *> UsingDecls) { - size_t Extra = additionalSizeToAlloc<NamedDecl *>(UsingDecls.size()); - return new (C, DC, Extra) UsingPackDecl(DC, InstantiatedFrom, UsingDecls); -} - -UsingPackDecl *UsingPackDecl::CreateDeserialized(ASTContext &C, unsigned ID, - unsigned NumExpansions) { - size_t Extra = additionalSizeToAlloc<NamedDecl *>(NumExpansions); - auto *Result = new (C, ID, Extra) UsingPackDecl(nullptr, nullptr, None); - Result->NumExpansions = NumExpansions; - auto *Trail = Result->getTrailingObjects<NamedDecl *>(); - for (unsigned I = 0; I != NumExpansions; ++I) - new (Trail + I) NamedDecl*(nullptr); - return Result; -} - void UnresolvedUsingValueDecl::anchor() { } UnresolvedUsingValueDecl * UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, NestedNameSpecifierLoc QualifierLoc, - const DeclarationNameInfo &NameInfo, - SourceLocation EllipsisLoc) { + const DeclarationNameInfo &NameInfo) { return new (C, DC) UnresolvedUsingValueDecl(DC, C.DependentTy, UsingLoc, - QualifierLoc, NameInfo, - EllipsisLoc); + QualifierLoc, NameInfo); } UnresolvedUsingValueDecl * @@ -2288,8 +2266,7 @@ UnresolvedUsingValueDecl::CreateDeserialized(ASTContext &C, unsigned ID) { return new (C, ID) UnresolvedUsingValueDecl(nullptr, QualType(), SourceLocation(), NestedNameSpecifierLoc(), - DeclarationNameInfo(), - SourceLocation()); + DeclarationNameInfo()); } SourceRange UnresolvedUsingValueDecl::getSourceRange() const { @@ -2306,18 +2283,17 @@ UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation TypenameLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TargetNameLoc, - DeclarationName TargetName, - SourceLocation EllipsisLoc) { + DeclarationName TargetName) { return new (C, DC) UnresolvedUsingTypenameDecl( DC, UsingLoc, TypenameLoc, QualifierLoc, TargetNameLoc, - TargetName.getAsIdentifierInfo(), EllipsisLoc); + TargetName.getAsIdentifierInfo()); } UnresolvedUsingTypenameDecl * UnresolvedUsingTypenameDecl::CreateDeserialized(ASTContext &C, unsigned ID) { return new (C, ID) UnresolvedUsingTypenameDecl( nullptr, SourceLocation(), SourceLocation(), NestedNameSpecifierLoc(), - SourceLocation(), nullptr, SourceLocation()); + SourceLocation(), nullptr); } void StaticAssertDecl::anchor() { } |