diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 05a0e43b5b73d..c992e8763057b 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -6626,11 +6626,9 @@ class Sema final { ParsedType getConstructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext); - ParsedType getDestructorName(SourceLocation TildeLoc, - IdentifierInfo &II, SourceLocation NameLoc, + ParsedType getDestructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, - ParsedType ObjectType, - bool EnteringContext); + ParsedType ObjectType, bool EnteringContext); ParsedType getDestructorTypeForDecltype(const DeclSpec &DS, ParsedType ObjectType); diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index b035bd9db9d5c..678ecad19ecd8 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -3114,10 +3114,9 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, } // Note that this is a destructor name. - ParsedType Ty = Actions.getDestructorName(TildeLoc, *ClassName, - ClassNameLoc, getCurScope(), - SS, ObjectType, - EnteringContext); + ParsedType Ty = + Actions.getDestructorName(*ClassName, ClassNameLoc, getCurScope(), SS, + ObjectType, EnteringContext); if (!Ty) return true; diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index dfb42799c67c1..a6e0a8abf81b9 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -138,9 +138,7 @@ ParsedType Sema::getConstructorName(IdentifierInfo &II, return ParsedType::make(T); } -ParsedType Sema::getDestructorName(SourceLocation TildeLoc, - IdentifierInfo &II, - SourceLocation NameLoc, +ParsedType Sema::getDestructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) { diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index d99c1d6222372..1f41bbb189df2 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -12587,12 +12587,9 @@ TreeTransform::TransformCXXPseudoDestructorExpr( E->getDestroyedTypeLoc()); } else { // Look for a destructor known with the given name. - ParsedType T = SemaRef.getDestructorName(E->getTildeLoc(), - *E->getDestroyedTypeIdentifier(), - E->getDestroyedTypeLoc(), - /*Scope=*/nullptr, - SS, ObjectTypePtr, - false); + ParsedType T = SemaRef.getDestructorName( + *E->getDestroyedTypeIdentifier(), E->getDestroyedTypeLoc(), + /*Scope=*/nullptr, SS, ObjectTypePtr, false); if (!T) return ExprError();