[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 22 19:56:23 PDT 2025
================
@@ -405,6 +405,10 @@ ArgType::matchesType(ASTContext &C, QualType argTy) const {
argTy = PT->getPointeeType();
}
+ if (const OverflowBehaviorType *OBT =
+ dyn_cast<OverflowBehaviorType>(argTy.getCanonicalType()))
+ argTy = OBT->getUnderlyingType();
+
----------------
mizvekov wrote:
Should this really canonicalize? It seems to me if the udnerlying type has a typedef that is meaningful here, we would still want to use that information here, right?
```suggestion
if (const auto *OBT = argTy->getAs<OverflowBehaviorType>())
argTy = OBT->getUnderlyingType();
```
https://github.com/llvm/llvm-project/pull/148914
More information about the cfe-commits
mailing list