Skip to content

Commit e3f8808

Browse files
committed
[Sema] NFC: Remove isSILAttribute
`TypeAttribute::isSilOnly` does the same thing.
1 parent e4bec41 commit e3f8808

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
@@ -3109,17 +3109,6 @@ void TypeAttrSet::diagnoseUnclaimed(CustomAttr *attr,
31093109
diagnose(attr->getLocation(), diag::unknown_attribute, typeName);
31103110
}
31113111

3112-
static bool isSILAttribute(TypeAttrKind attrKind) {
3113-
switch (attrKind) {
3114-
#define SIL_TYPE_ATTR(SPELLING, CLASS) case TypeAttrKind::CLASS:
3115-
#include "swift/AST/TypeAttr.def"
3116-
return true;
3117-
3118-
default:
3119-
return false;
3120-
}
3121-
}
3122-
31233112
static bool isFunctionAttribute(TypeAttrKind attrKind) {
31243113
static const TypeAttrKind FunctionAttrs[] = {
31253114
TypeAttrKind::Convention,
@@ -3151,7 +3140,7 @@ void TypeAttrSet::diagnoseUnclaimed(TypeAttribute *attr,
31513140

31523141
// Use a special diagnostic for SIL attributes.
31533142
if (!(options & TypeResolutionFlags::SILType) &&
3154-
isSILAttribute(attr->getKind())) {
3143+
TypeAttribute::isSilOnly(attr->getKind())) {
31553144
diagnose(attr->getStartLoc(), diag::unknown_attribute, attr->getAttrName());
31563145
return;
31573146
}

0 commit comments

Comments
 (0)