[clang] [clang] Rework `hasBooleanRepresentation`. (PR #136038)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 17 12:02:25 PDT 2025
================
@@ -2336,16 +2336,9 @@ bool Type::isArithmeticType() const {
}
bool Type::hasBooleanRepresentation() const {
- if (isBooleanType())
- return true;
-
- if (const EnumType *ET = getAs<EnumType>())
- return ET->getDecl()->getIntegerType()->isBooleanType();
-
- if (const AtomicType *AT = getAs<AtomicType>())
- return AT->getValueType()->hasBooleanRepresentation();
-
- return false;
+ if (const auto *VT = dyn_cast<VectorType>(CanonicalType))
----------------
rjmccall wrote:
That was meant as a response to Michele, our reviews just raced.
https://github.com/llvm/llvm-project/pull/136038
More information about the cfe-commits
mailing list