Skip to content

Commit dff56d8

Browse files
committed
Sema: Remaining uses of getNumParameterLists()
1 parent b203e2f commit dff56d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/TypeCheckError.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AbstractFunction {
4141
};
4242
unsigned TheKind : 2;
4343
unsigned IsRethrows : 1;
44-
unsigned ParamCount : 28;
44+
unsigned ParamCount : 2;
4545

4646
public:
4747
explicit AbstractFunction(Kind kind, Expr *fn)
@@ -54,7 +54,7 @@ class AbstractFunction {
5454
explicit AbstractFunction(AbstractFunctionDecl *fn)
5555
: TheKind(Kind::Function),
5656
IsRethrows(fn->getAttrs().hasAttribute<RethrowsAttr>()),
57-
ParamCount(fn->getNumParameterLists()) {
57+
ParamCount(fn->getImplicitSelfDecl() ? 2 : 1) {
5858
TheFunction = fn;
5959
}
6060

@@ -926,7 +926,7 @@ class Context {
926926
}
927927

928928
return Context(getKindForFunctionBody(
929-
D->getInterfaceType(), D->getNumParameterLists()));
929+
D->getInterfaceType(), D->getImplicitSelfDecl() ? 2 : 1));
930930
}
931931

932932
static Context forInitializer(Initializer *init) {

0 commit comments

Comments
 (0)