From 8693e0ee6a25277d61bd482455d74a5089ea2add Mon Sep 17 00:00:00 2001 From: Enrico Steffinlongo Date: Sat, 13 Oct 2018 19:42:10 +0000 Subject: [PATCH] [analyzer] Small SMT API improvement Summary: Removed const qualifier from reset method of SMTSolver and Z3Solver objects. Reviewers: mikhail.ramalho, george.karpenkov, NoQ, ddcc Reviewed By: NoQ Subscribers: xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D52031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344463 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h | 2 +- lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h index 62d1d65485..0db1e364b6 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h @@ -283,7 +283,7 @@ public: virtual void pop(unsigned NumStates = 1) = 0; /// Reset the solver and remove all constraints. - virtual void reset() const = 0; + virtual void reset() = 0; virtual void print(raw_ostream &OS) const = 0; }; diff --git a/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp b/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp index f1938057b8..11e758a47b 100644 --- a/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp +++ b/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp @@ -859,7 +859,7 @@ public: } /// Reset the solver and remove all constraints. - void reset() const override { Z3_solver_reset(Context.Context, Solver); } + void reset() override { Z3_solver_reset(Context.Context, Solver); } void print(raw_ostream &OS) const override { OS << Z3_solver_to_string(Context.Context, Solver); -- 2.40.0