[clang] [clang][dataflow] Add a simple boolean model for clang dataflow analyses (PR #231061)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 12 03:11:46 PDT 2026


================
@@ -40,6 +44,481 @@
 namespace clang {
 namespace dataflow {
 
+namespace {
+
+class SimpleBoolModel : public Environment::BoolModel {
+public:
+  SimpleBoolModel() : BoolModel(BoolModelKind::Simple) {}
+
+  static bool classof(const BoolModel *M) {
+    return M->getKind() == BoolModelKind::Simple;
+  }
+
+  std::unique_ptr<BoolModel> clone() const override {
+    return std::make_unique<SimpleBoolModel>(*this);
+  }
+
+  void onFork() override {}
+
+  void assume(const Formula &F) override {
+    if (HasContradiction)
----------------
Xazax-hun wrote:

Do we consider all states with a contradiction to be equivalent? 

https://github.com/llvm/llvm-project/pull/231061


More information about the cfe-commits mailing list