[PATCH] D125547: [analyzer][solver] Handle UnarySymExpr in SMTConv

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 00:51:00 PDT 2022


martong marked 2 inline comments as done.
martong added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h:258
 
+  static inline llvm::SMTExprRef fromUnary(llvm::SMTSolverRef &Solver,
+                                           ASTContext &Ctx,
----------------
steakhal wrote:
> I would prefer the `fromUnOp` similarly to how `fromBinOp` is called.
Yeah, very good point, I just realized that `fromUnOp` is already implemented!


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h:467-469
+      QualType FromTy;
+      llvm::SMTExprRef Exp =
+          getSymExpr(Solver, Ctx, USE->getOperand(), &FromTy, hasComparison);
----------------
steakhal wrote:
> If you discard the `FromTy`, you could have passed a nullptr there.
Ok, Changed it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125547/new/

https://reviews.llvm.org/D125547



More information about the cfe-commits mailing list