================ @@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; - if (ZeroIsUndefined && !Val) - return Error(E); + if (!Val) { ---------------- nickdesaulniers wrote:
Hmm...for these 2 type generic builtins, it might be nice to check the number of arguments first, then call `EvaluateInteger` on the correct arg, rather than calling `EvaluateInteger`, failing, then calling `EvaluateInteger` again on the second arg. https://github.com/llvm/llvm-project/pull/86577 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits