Skip to content

Commit 83c0667

Browse files
committed
Sema: Add missing range on notes about representability
1 parent 43ac239 commit 83c0667

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckDeclObjC.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static void diagnoseTypeNotRepresentableInObjC(const DeclContext *DC,
191191
if (auto *CD = T->getClassOrBoundGenericClass()) {
192192
if (language == ForeignLanguage::C) {
193193
diags.diagnose(TypeRange.Start, diag::cdecl_incompatible_with_classes)
194+
.highlight(TypeRange)
194195
.limitBehavior(behavior);
195196
return;
196197
}
@@ -232,6 +233,7 @@ static void diagnoseTypeNotRepresentableInObjC(const DeclContext *DC,
232233
// No protocol is representable in C.
233234
if (language == ForeignLanguage::C) {
234235
diags.diagnose(TypeRange.Start, diag::cdecl_incompatible_with_protocols)
236+
.highlight(TypeRange)
235237
.limitBehavior(behavior);
236238
return;
237239
}

0 commit comments

Comments
 (0)