Skip to content

Commit f5246c4

Browse files
committed
[Sema] checkDefaultArguments doesn't need this param
1 parent 65719d7 commit f5246c4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,8 +1943,7 @@ static void checkInheritedDefaultValueRestrictions(ParamDecl *PD) {
19431943
}
19441944

19451945
/// Check the default arguments that occur within this pattern.
1946-
static void checkDefaultArguments(TypeChecker &tc, ParameterList *params,
1947-
ValueDecl *VD) {
1946+
static void checkDefaultArguments(TypeChecker &tc, ParameterList *params) {
19481947
for (auto *param : *params) {
19491948
checkInheritedDefaultValueRestrictions(param);
19501949
if (!param->getDefaultValue() ||
@@ -2598,7 +2597,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
25982597
(void) SD->getImplInfo();
25992598

26002599
TC.checkParameterAttributes(SD->getIndices());
2601-
checkDefaultArguments(TC, SD->getIndices(), SD);
2600+
checkDefaultArguments(TC, SD->getIndices());
26022601

26032602
if (SD->getDeclContext()->getSelfClassDecl()) {
26042603
checkDynamicSelfType(SD, SD->getValueInterfaceType());
@@ -3219,7 +3218,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
32193218
if (FD->getDeclContext()->getSelfClassDecl())
32203219
checkDynamicSelfType(FD, FD->getResultInterfaceType());
32213220

3222-
checkDefaultArguments(TC, FD->getParameters(), FD);
3221+
checkDefaultArguments(TC, FD->getParameters());
32233222

32243223
// Validate 'static'/'class' on functions in extensions.
32253224
auto StaticSpelling = FD->getStaticSpelling();
@@ -3277,7 +3276,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
32773276

32783277
if (auto *PL = EED->getParameterList()) {
32793278
TC.checkParameterAttributes(PL);
3280-
checkDefaultArguments(TC, PL, EED);
3279+
checkDefaultArguments(TC, PL);
32813280
}
32823281

32833282
// We don't yet support raw values on payload cases.
@@ -3537,7 +3536,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
35373536
TC.definedFunctions.push_back(CD);
35383537
}
35393538

3540-
checkDefaultArguments(TC, CD->getParameters(), CD);
3539+
checkDefaultArguments(TC, CD->getParameters());
35413540
}
35423541

35433542
void visitDestructorDecl(DestructorDecl *DD) {

0 commit comments

Comments
 (0)