Skip to content

Commit 8edfb9f

Browse files
committed
[Sema] NFC: Remove isSILAttribute
`TypeAttribute::isSilOnly` does the same thing.
1 parent 91adec9 commit 8edfb9f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,17 +3112,6 @@ void TypeAttrSet::diagnoseUnclaimed(CustomAttr *attr,
31123112
diagnose(attr->getLocation(), diag::unknown_attribute, typeName);
31133113
}
31143114

3115-
static bool isSILAttribute(TypeAttrKind attrKind) {
3116-
switch (attrKind) {
3117-
#define SIL_TYPE_ATTR(SPELLING, CLASS) case TypeAttrKind::CLASS:
3118-
#include "swift/AST/TypeAttr.def"
3119-
return true;
3120-
3121-
default:
3122-
return false;
3123-
}
3124-
}
3125-
31263115
static bool isFunctionAttribute(TypeAttrKind attrKind) {
31273116
static const TypeAttrKind FunctionAttrs[] = {
31283117
TypeAttrKind::Convention,
@@ -3154,7 +3143,7 @@ void TypeAttrSet::diagnoseUnclaimed(TypeAttribute *attr,
31543143

31553144
// Use a special diagnostic for SIL attributes.
31563145
if (!(options & TypeResolutionFlags::SILType) &&
3157-
isSILAttribute(attr->getKind())) {
3146+
TypeAttribute::isSilOnly(attr->getKind())) {
31583147
diagnose(attr->getStartLoc(), diag::unknown_attribute, attr->getAttrName());
31593148
return;
31603149
}

0 commit comments

Comments
 (0)