[clang] [Sema] Fix ICE when passing invalid types to abs #204777 (PR #205017)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 16:02:53 PDT 2026
=?utf-8?q?Hüseyin_Dönmez?= <donnmez.huseyin at gmail.com>,
=?utf-8?q?Hüseyin_Dönmez?= <donnmez.huseyin at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/205017 at github.com>
================
@@ -10608,6 +10608,12 @@ void Sema::CheckAbsoluteValueFunction(const CallExpr *Call,
if (IsStdAbs)
return;
+ // Prevent reaching unreachable code in getAbsoluteValueKind for unsupported
+ // types.
+ if (!ArgType->isIntegralOrEnumerationType() &&
----------------
shafik wrote:
Doesn't `isArithmeticType()` do this check?
@cor3ntin @AaronBallman
https://github.com/llvm/llvm-project/pull/205017
More information about the cfe-commits
mailing list