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

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 07:22:22 PDT 2022


steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.

minor nits;
Thanks



================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h:258
 
+  static inline llvm::SMTExprRef fromUnary(llvm::SMTSolverRef &Solver,
+                                           ASTContext &Ctx,
----------------
I would prefer the `fromUnOp` similarly to how `fromBinOp` is called.


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


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