================
@@ -138,8 +165,7 @@ void SignedCharMisuseCheck::check(const
MatchFinder::MatchResult &Result) {
// The potential misinterpretation happens for negative values only.
Expr::EvalResult EVResult;
if (!SignedCastExpression->isValueDependent() &&
- SignedCastExpression->getSubExpr()->EvaluateAsInt(EVResult,
- *Result.Context)) {
+ SignedCastExpression->EvaluateAsInt(EVResult, *Result.Context)) {
----------------
cavdarahmet wrote:
Confirmed and fixed — thanks for catching this, it was a real regression. The
shared `check()` path is now identical to `main` again (both
`getSubExpr()->EvaluateAsInt()` calls restored); the cctype case binds a
separate `cctypeArgument` node and is handled in an isolated early-return
branch, exactly as you suggested. Your example is now a regression test, plus a
constexpr-negative test for the new path.
https://github.com/llvm/llvm-project/pull/211403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits