[all-commits] [llvm/llvm-project] 41de4b: [NFC][analyzer] Cleanup dead code around NodeBuild...

Donát Nagy via All-commits all-commits at lists.llvm.org
Thu Feb 5 07:05:09 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41de4b1c6fb86cc09079c9e345f4cc5000c373b4
      https://github.com/llvm/llvm-project/commit/41de4b1c6fb86cc09079c9e345f4cc5000c373b4
  Author: Donát Nagy <donat.nagy at ericsson.com>
  Date:   2026-02-05 (Thu, 05 Feb 2026)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
    M clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

  Log Message:
  -----------
  [NFC][analyzer] Cleanup dead code around NodeBuilder (#179711)

As I was trying to understand the class `NodeBuilder` and its
subclasses, I wasted a few hours on studying dead or needlessly
complicated code. I'm creating this patch to ensure that others in the
future won't need to bother with this cruft.

This commit eliminates three deficiencies:
- (Small change:) In a constructor of `StmtNodeBuilder` I switched to
using the `takeNodes()` overload which accepts an `ExplodedNodeSet`
(instead of manually iterating).
- The `Finalized` attribute of NodeBuilder was completely irrelevant (it
was always initialized to `true`).
- The "main" feature of `NodeBuilderWithSinks` was that it gathered the
generated sink nodes into a set, but this was never actually used. As
the only other feature (storing a `ProgramPoint` in a data member) was
very trivial, I replaced this class with a plain `NodeBuilder` in the
only location that used it.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list