Skip to content

Commit 9a88d61

Browse files
committed
Address xedin's review feedback
1 parent 8b7b0e9 commit 9a88d61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,9 +2142,9 @@ bool TrailingClosureAmbiguityFailure::diagnoseAsNote() {
21422142
return false;
21432143

21442144
const ParameterList *paramList = callee->getParameters();
2145-
if (paramList->getArray().empty())
2145+
if (!paramList || paramList->size() == 0)
21462146
return false;
2147-
const ParamDecl *param = paramList->getArray().back();
2147+
const ParamDecl *param = paramList->back();
21482148

21492149
// Soundness-check that the trailing closure corresponds to this parameter.
21502150
if (!param->hasInterfaceType() ||

0 commit comments

Comments
 (0)