diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h index 277f25d2c5ea..28e31896a735 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h @@ -35,6 +35,8 @@ public: /// Checks if the added constraints are satisfiable virtual clang::ento::ConditionTruthVal isModelFeasible() = 0; + /// Dumps SMT formula + LLVM_DUMP_METHOD virtual void dump() const = 0; }; // end class SMTConstraintManager } // namespace ento diff --git a/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp index dccd158489b0..0454825c6ce5 100644 --- a/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp @@ -911,6 +911,8 @@ public: ConditionTruthVal isModelFeasible() override; + LLVM_DUMP_METHOD void dump() const override; + //===------------------------------------------------------------------===// // Implementation for interface from ConstraintManager. //===------------------------------------------------------------------===// @@ -1299,6 +1301,11 @@ clang::ento::ConditionTruthVal Z3ConstraintManager::isModelFeasible() { return ConditionTruthVal(); } +LLVM_DUMP_METHOD void Z3ConstraintManager::dump() const +{ + Solver.dump(); +} + //===------------------------------------------------------------------===// // Internal implementation. //===------------------------------------------------------------------===//