[PATCH] D45517: [analyzer] False positive refutation with Z3

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 31 16:28:19 PDT 2018


george.karpenkov added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:925
 
+  void reset() override { Solver.reset(); }
+
----------------
mikhail.ramalho wrote:
> george.karpenkov wrote:
> > We don't need `reset` anymore.
> We don't need it but there's no reason to remove it, right? I might be useful in the future.
We try to keep the code as small and as simple as possible so that it still achieves the task -- under that logic, unused methods should not be added.
I dislike `reset` in particular as it encourages stateful approach where the same instance is used for all queries, which increases the likelihood of bugs.


https://reviews.llvm.org/D45517





More information about the cfe-commits mailing list