================
@@ -8914,6 +8975,12 @@ inline bool Type::isIntegerType() const {
     return IsEnumDeclComplete(ET->getOriginalDecl()) &&
            !IsEnumDeclScoped(ET->getOriginalDecl());
   }
+
+  if (isOverflowBehaviorType())
+    return cast<OverflowBehaviorType>(CanonicalType)
+        ->getUnderlyingType()
+        ->isIntegerType();
----------------
mizvekov wrote:

Nit: If you have to test and cast, might as well just dyn_cast.
```suggestion
  if (const auto *OT = dyn_cast<OverflowBehaviorType>(CanonicalType))
    return OT->getUnderlyingType()->isIntegerType();
```

https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to