Remove an unused parameter; NFC

This commit is contained in:
Aaron Ballman 2021-11-01 14:42:00 -04:00
parent d5b40a30b5
commit dfa0981407
1 changed files with 7 additions and 9 deletions

View File

@ -3182,9 +3182,8 @@ ExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
return ULE;
}
static void
diagnoseUncapturableValueReference(Sema &S, SourceLocation loc,
ValueDecl *var, DeclContext *DC);
static void diagnoseUncapturableValueReference(Sema &S, SourceLocation loc,
ValueDecl *var);
/// Complete semantic analysis for a reference to the given declaration.
ExprResult Sema::BuildDeclarationNameExpr(
@ -3348,7 +3347,7 @@ ExprResult Sema::BuildDeclarationNameExpr(
if (BD->getDeclContext() != CurContext) {
auto *DD = dyn_cast_or_null<VarDecl>(BD->getDecomposedDecl());
if (DD && DD->hasLocalStorage())
diagnoseUncapturableValueReference(*this, Loc, BD, CurContext);
diagnoseUncapturableValueReference(*this, Loc, BD);
}
break;
}
@ -17392,9 +17391,8 @@ void Sema::MarkCaptureUsedInEnclosingContext(VarDecl *Capture,
MarkVarDeclODRUsed(Capture, Loc, *this, &CapturingScopeIndex);
}
static void
diagnoseUncapturableValueReference(Sema &S, SourceLocation loc,
ValueDecl *var, DeclContext *DC) {
static void diagnoseUncapturableValueReference(Sema &S, SourceLocation loc,
ValueDecl *var) {
DeclContext *VarDC = var->getDeclContext();
// If the parameter still belongs to the translation unit, then
@ -17473,7 +17471,7 @@ static DeclContext *getParentOfCapturingContextOrNull(DeclContext *DC, VarDecl *
return getLambdaAwareParentOfDeclContext(DC);
else if (Var->hasLocalStorage()) {
if (Diagnose)
diagnoseUncapturableValueReference(S, Loc, Var, DC);
diagnoseUncapturableValueReference(S, Loc, Var);
}
return nullptr;
}
@ -17947,7 +17945,7 @@ bool Sema::tryCaptureVariable(
Diag(LSI->Lambda->getBeginLoc(), diag::note_lambda_decl);
buildLambdaCaptureFixit(*this, LSI, Var);
} else
diagnoseUncapturableValueReference(*this, ExprLoc, Var, DC);
diagnoseUncapturableValueReference(*this, ExprLoc, Var);
}
return true;
}