Skip to content

Commit c0f5b0a

Browse files
authored
[clang][NFC] Use BuiltinType::isFloatingPoint() in Type::isFloatingType() (#139035)
They both used to do the same comparison of getKind() to Half and Ibm128.
1 parent f7c01c4 commit c0f5b0a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/AST/Type.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,8 +2301,7 @@ bool Type::hasUnsignedIntegerRepresentation() const {
23012301

23022302
bool Type::isFloatingType() const {
23032303
if (const auto *BT = dyn_cast<BuiltinType>(CanonicalType))
2304-
return BT->getKind() >= BuiltinType::Half &&
2305-
BT->getKind() <= BuiltinType::Ibm128;
2304+
return BT->isFloatingPoint();
23062305
if (const auto *CT = dyn_cast<ComplexType>(CanonicalType))
23072306
return CT->getElementType()->isFloatingType();
23082307
return false;

0 commit comments

Comments
 (0)