Skip to content

Commit b2d0f25

Browse files
authored
Merge pull request #66114 from beccadax/implementation-warnings
[NFC] Use method for more @objcImpl diagnostics
2 parents ca004c2 + c93e489 commit b2d0f25

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
@@ -3116,13 +3116,13 @@ class ObjCImplementationChecker {
31163116
}
31173117

31183118
// Ambiguous match (many requirements match one candidate)
3119-
cand->diagnose(diag::objc_implementation_multiple_matching_requirements,
3119+
diagnose(cand, diag::objc_implementation_multiple_matching_requirements,
31203120
cand->getDescriptiveKind(), cand);
31213121

31223122
bool shouldOfferFix = !candExplicitObjCName;
31233123
for (auto req : matchedRequirements.matches) {
31243124
auto diag =
3125-
cand->diagnose(diag::objc_implementation_one_matched_requirement,
3125+
diagnose(cand, diag::objc_implementation_one_matched_requirement,
31263126
req->getDescriptiveKind(), req,
31273127
*req->getObjCRuntimeName(), shouldOfferFix,
31283128
req->getObjCRuntimeName()->getString(scratch));
@@ -3165,14 +3165,14 @@ class ObjCImplementationChecker {
31653165
cast<IterableDeclContext>(req->getDeclContext()->getAsDecl());
31663166
auto ext =
31673167
cast<ExtensionDecl>(reqIDC->getImplementationContext());
3168-
ext->diagnose(diag::objc_implementation_multiple_matching_candidates,
3168+
diagnose(ext, diag::objc_implementation_multiple_matching_candidates,
31693169
req->getDescriptiveKind(), req,
31703170
*req->getObjCRuntimeName());
31713171

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

@@ -3183,7 +3183,7 @@ class ObjCImplementationChecker {
31833183
}
31843184
}
31853185

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

0 commit comments

Comments
 (0)