[clang] [NFCI][analyzer] Regularize NodeBuilder classes (PR #180960)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 07:21:46 PST 2026


================
@@ -399,55 +399,56 @@ class BranchNodeBuilder: public NodeBuilder {
                              ExplodedNode *Pred);
 };
 
-class IndirectGotoNodeBuilder {
-  const CoreEngine &Eng;
-  const CFGBlock *Src;
+class IndirectGotoNodeBuilder : public NodeBuilder {
----------------
steakhal wrote:

So `NodeBuilder` is a polymorphic base.
That suggest to me that we should mark us `final` here to allow devirtualizations to happen.

I think we should also add or override an `anchor` method as per https://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers

Same reasoning applies to the other derived classes.

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


More information about the cfe-commits mailing list