Skip to content

Commit a853428

Browse files
committed
[FOLD] more cleanups
1 parent 08e551a commit a853428

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

clang/include/clang/AST/DeclTemplate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ class RedeclarableTemplateDecl : public TemplateDecl,
863863

864864
/// Note that this member template is a specialization.
865865
void setMemberSpecialization() {
866+
assert(!isMemberSpecialization() && "already a member specialization");
866867
Common.setInt(true);
867868
}
868869

clang/lib/Sema/SemaDecl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12005,8 +12005,6 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
1200512005
// If this is an explicit specialization of a member that is a function
1200612006
// template, mark it as a member specialization.
1200712007
if (IsMemberSpecialization) {
12008-
NewTemplateDecl->setMemberSpecialization();
12009-
// assert(OldTemplateDecl->isMemberSpecialization());
1201012008
// Explicit specializations of a member template do not inherit deleted
1201112009
// status from the parent member template that they are specializing.
1201212010
if (OldFD->isDeleted()) {

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4693,20 +4693,6 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD,
46934693
Innermost = FD->getTemplateSpecializationArgs()->asArray();
46944694
}
46954695
}
4696-
#if 0
4697-
4698-
Pattern = FTD->isCXXClassMember() ? FTD->getFirstDecl() : FTD;
4699-
} else if (FD->isCXXClassMember()) {
4700-
Pattern = FD->getFirstDecl();
4701-
} else {
4702-
Pattern = FD;
4703-
}
4704-
#elif 0
4705-
Pattern = FD;
4706-
#elif 0
4707-
Pattern = FD->getTemplateInstantiationPattern(/*ForDefinition=*/true);
4708-
#elif 1
4709-
#endif
47104696

47114697
// Instantiate the expression.
47124698
//

0 commit comments

Comments
 (0)