Revert "[c++1z] P0195R2: Support pack-expansion of using-declarations."
This reverts commit r290080 as it leads to many Clang crashes, e.g.:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/1814
llvm-svn: 290092
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index 1860b94..8563416 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -2250,37 +2250,15 @@
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 @@
return new (C, ID) UnresolvedUsingValueDecl(nullptr, QualType(),
SourceLocation(),
NestedNameSpecifierLoc(),
- DeclarationNameInfo(),
- SourceLocation());
+ DeclarationNameInfo());
}
SourceRange UnresolvedUsingValueDecl::getSourceRange() const {
@@ -2306,18 +2283,17 @@
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() { }