[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 25 15:56:58 PDT 2025
================
@@ -14308,6 +14455,12 @@ static QualType getCommonNonSugarTypeNode(const ASTContext &Ctx, const Type *X,
getCommonTypeKeyword(NX, NY, /*IsSame=*/true),
getCommonQualifier(Ctx, NX, NY, /*IsSame=*/true), NX->getIdentifier());
}
+ case Type::OverflowBehavior: {
+ // FIXME: Should we consider both types?
+ const auto *NX = cast<OverflowBehaviorType>(X);
+ return Ctx.getOverflowBehaviorType(NX->getBehaviorKind(),
+ NX->getUnderlyingType());
----------------
JustinStitt wrote:
fixed in fixed with [`04af8bf`](https://github.com/llvm/llvm-project/pull/148914/commits/04af8bf6e9620c71673a435d3b2eebccd7db3682) but instead of implementing `getCommonUnderlyingType` I went with a recursive call to `getCommonNonSugarTypeNode()`.
https://github.com/llvm/llvm-project/pull/148914
More information about the cfe-commits
mailing list