<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/73088>73088</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] [StaticAnalyzer] Turn struct NodeBuilderContext into a class
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          gz83
      </td>
    </tr>
</table>

<pre>
    `// TODO: Turn into a class.
struct NodeBuilderContext {
  const CoreEngine &Eng;
  const CFGBlock *Block;
  const LocationContext *LC;

 NodeBuilderContext(const CoreEngine &E, const CFGBlock *B,
 const LocationContext *L)
      : Eng(E), Block(B), LC(L) {
 assert(B);
  }

  NodeBuilderContext(const CoreEngine &E, const CFGBlock *B, ExplodedNode *N)
      : NodeBuilderContext(E, B, N->getLocationContext()) {}

  /// Return the CFGBlock associated with this builder.
  const CFGBlock *getBlock() const { return Block; }

 /// Returns the number of times the current basic block has been
  /// visited on the exploded graph path.
  unsigned blockCount() const {
 return Eng.WList->getBlockCounter().getNumVisited(
 LC->getStackFrame(),
                    Block->getBlockID());
 }
};`

Consider implementing this TODO
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE-PqzgM_zThEg2ipi30wKHQdrVS1Sfte9o9B3AhO5BUiZmdmU-_CqF_pu3cHpdSY_v3J46FtbJRiBlb5GyxCcRArTZZ85nGQanrj4wtIwY7Bjv-68fmB4vX_NdgFJeKNBe86oS1IYs2LFpbMkNF_KBrzAfZ1WgKrQjfibMk9ymcV1pZ4oU2uFWNVMgZLLeqYfF9xu6PvNPVK2ewHl8eMva6EiS1uoDAel9csqbcRzIM0qccGBTPoBkUU6vvURmsztTc4zxykiDdui9QcC8A0nz6vy8YpK7sxhlhLRo6J13FsmTzRdFvkcS376dO11i7Zi54eKLhKdDYdGxxeGHxtkG6c4RBOqr02u7J-1Fy0_QXkpsjavHKTlirKykIa_6fpJZTKy0vPYXw-_lokM4OO1yfwJKcG49xnp8HL-_Z2JGOGvoSDddHTrJHH6sGY1ARL4WVFS9H5FZYXiKqR21v0konQnt9OJnNGyNOLT8Jai9qBjXev9r3LPSg6F7GlDqJ2aom_GcvLU3255c6NL4ybJAOQ_-3J-FivsG-mEp-kqhed0b0eD6s4vbsvz5j_1usPzeXI76O6dXZZOOiy-jW6EIrK2s0XPanDntUJFXjT9ctlaDO4noVr0SA2SyJomU8i9MkaDM81lDXuMQkiY8luLdocYxmSVIvMEIIZAYRxLMZQLSIl5CE81QAxMlqVq2grso5m0fYC9mFXffWh9o0gbR2wCyJozQNOlFiZ8fVB1B1wl1acFvQZC7_pRway-ZRJy3ZaweS1I37shgrFhvOFvlPEiSrtRLdxycaFxzX5Pc78XaBBoPpspboZFm89jPUSGqHMqx0z2DnoKefl5PR_2JFDHajEstgN4r5PwAA__-MJL1d">