Skip to content

Commit 7bb2749

Browse files
committed
[Sema] NFC: Misc formatting changes
1 parent e25fa23 commit 7bb2749

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

lib/Sema/TypeCheckDeclObjC.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,18 +2028,18 @@ bool swift::diagnoseUnintendedObjCMethodOverrides(SourceFile &sf) {
20282028
// Diagnose the override.
20292029
auto methodDiagInfo = getObjCMethodDiagInfo(method);
20302030
auto overriddenDiagInfo = getObjCMethodDiagInfo(overriddenMethod);
2031-
Ctx.Diags.diagnose(method, diag::objc_override_other,
2032-
methodDiagInfo.first,
2033-
methodDiagInfo.second,
2034-
overriddenDiagInfo.first,
2035-
overriddenDiagInfo.second,
2036-
selector,
2037-
overriddenMethod->getDeclContext()
2038-
->getDeclaredInterfaceType());
2031+
2032+
Ctx.Diags.diagnose(
2033+
method, diag::objc_override_other, methodDiagInfo.first,
2034+
methodDiagInfo.second, overriddenDiagInfo.first,
2035+
overriddenDiagInfo.second, method->getObjCSelector(),
2036+
overriddenMethod->getDeclContext()->getDeclaredInterfaceType());
2037+
20392038
const ValueDecl *overriddenDecl = overriddenMethod;
20402039
if (overriddenMethod->isImplicit())
20412040
if (auto accessor = dyn_cast<AccessorDecl>(overriddenMethod))
20422041
overriddenDecl = accessor->getStorage();
2042+
20432043
Ctx.Diags.diagnose(overriddenDecl, diag::objc_declared_here,
20442044
overriddenDiagInfo.first, overriddenDiagInfo.second);
20452045

@@ -2143,12 +2143,9 @@ bool swift::diagnoseObjCMethodConflicts(SourceFile &sf) {
21432143
Ctx.Diags.diagnose(originalDecl, diag::invalid_redecl_prev,
21442144
originalDecl->getBaseName());
21452145
} else {
2146-
Ctx.Diags.diagnose(conflictingDecl, diag::objc_redecl,
2147-
diagInfo.first,
2148-
diagInfo.second,
2149-
origDiagInfo.first,
2150-
origDiagInfo.second,
2151-
selector);
2146+
Ctx.Diags.diagnose(conflictingDecl, diag::objc_redecl, diagInfo.first,
2147+
diagInfo.second, origDiagInfo.first,
2148+
origDiagInfo.second, selector);
21522149
Ctx.Diags.diagnose(originalDecl, diag::objc_declared_here,
21532150
origDiagInfo.first, origDiagInfo.second);
21542151
}

0 commit comments

Comments
 (0)