Skip to content

Commit 9d762ee

Browse files
committed
[NFC] Use method for more @objcImpl diagnostics
1 parent 5bf8f62 commit 9d762ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Sema/TypeCheckDeclObjC.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,13 +3115,13 @@ class ObjCImplementationChecker {
31153115
}
31163116

31173117
// Ambiguous match (many requirements match one candidate)
3118-
cand->diagnose(diag::objc_implementation_multiple_matching_requirements,
3118+
diagnose(cand, diag::objc_implementation_multiple_matching_requirements,
31193119
cand->getDescriptiveKind(), cand);
31203120

31213121
bool shouldOfferFix = !candExplicitObjCName;
31223122
for (auto req : matchedRequirements.matches) {
31233123
auto diag =
3124-
cand->diagnose(diag::objc_implementation_one_matched_requirement,
3124+
diagnose(cand, diag::objc_implementation_one_matched_requirement,
31253125
req->getDescriptiveKind(), req,
31263126
*req->getObjCRuntimeName(), shouldOfferFix,
31273127
req->getObjCRuntimeName()->getString(scratch));
@@ -3164,14 +3164,14 @@ class ObjCImplementationChecker {
31643164
cast<IterableDeclContext>(req->getDeclContext()->getAsDecl());
31653165
auto ext =
31663166
cast<ExtensionDecl>(reqIDC->getImplementationContext());
3167-
ext->diagnose(diag::objc_implementation_multiple_matching_candidates,
3167+
diagnose(ext, diag::objc_implementation_multiple_matching_candidates,
31683168
req->getDescriptiveKind(), req,
31693169
*req->getObjCRuntimeName());
31703170

31713171
for (auto cand : cands.matches) {
31723172
bool shouldOfferFix = !unmatchedCandidates[cand];
31733173
auto diag =
3174-
cand->diagnose(diag::objc_implementation_candidate_impl_here,
3174+
diagnose(cand, diag::objc_implementation_candidate_impl_here,
31753175
cand->getDescriptiveKind(), cand, shouldOfferFix,
31763176
req->getObjCRuntimeName()->getString(scratch));
31773177

@@ -3182,7 +3182,7 @@ class ObjCImplementationChecker {
31823182
}
31833183
}
31843184

3185-
req->diagnose(diag::objc_implementation_requirement_here,
3185+
diagnose(req, diag::objc_implementation_requirement_here,
31863186
req->getDescriptiveKind(), req);
31873187
}
31883188

0 commit comments

Comments
 (0)