Skip to content

Commit 96a2833

Browse files
committed
Sema: Add missing range on notes about representability
1 parent b8b13d8 commit 96a2833

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
@@ -192,6 +192,7 @@ static void diagnoseTypeNotRepresentableInObjC(const DeclContext *DC,
192192
if (auto *CD = T->getClassOrBoundGenericClass()) {
193193
if (language == ForeignLanguage::C) {
194194
diags.diagnose(TypeRange.Start, diag::cdecl_incompatible_with_classes)
195+
.highlight(TypeRange)
195196
.limitBehavior(behavior);
196197
return;
197198
}
@@ -233,6 +234,7 @@ static void diagnoseTypeNotRepresentableInObjC(const DeclContext *DC,
233234
// No protocol is representable in C.
234235
if (language == ForeignLanguage::C) {
235236
diags.diagnose(TypeRange.Start, diag::cdecl_incompatible_with_protocols)
237+
.highlight(TypeRange)
236238
.limitBehavior(behavior);
237239
return;
238240
}

0 commit comments

Comments
 (0)