=?utf-8?q?Hüseyin_Dönmez?= <[email protected]>,
=?utf-8?q?Hüseyin_Dönmez?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -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() &&
----------------
AaronBallman wrote:

They are different, particularly around handling of enumerations. 
`getAbsoluteValueKind()` is checking for `isIntegralOrEnumerationType()` 
specifically, so using `isArithmeticType()` here would still hit the bug being 
solved.

Whether we should be using `isArithmeticType()` in both places is an 
interesting question, but outside the scope of this PR.

https://github.com/llvm/llvm-project/pull/205017
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to