[clang] [analyzer] Fix unary/binary op support for SMT symbolic execution (PR #205078)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 02:52:39 PDT 2026
================
@@ -432,39 +475,47 @@ class SMTConv {
RetTy = Sym->getType();
QualType FromTy;
- llvm::SMTExprRef Exp =
+ std::optional<llvm::SMTExprRef> Exp =
getSymExpr(Solver, Ctx, SC->getOperand(), FromTy, hasComparison);
-
+ if (!Exp) {
+ return std::nullopt;
+ }
----------------
steakhal wrote:
Can you drop the braces for single statement ifs? I'm not sure if you have any other instances of this in this PR, but if so, please address those as well.
Refer to the llvm [coding style](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements).
https://github.com/llvm/llvm-project/pull/205078
More information about the cfe-commits
mailing list