[clang] [NFC][analyzer] Get rid of imaginary friends (of classes) (PR #180188)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 04:50:45 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: DonĂ¡t Nagy (NagyDonat)

<details>
<summary>Changes</summary>

These NodeBuilder classes were deleted from the codebase in 2011 (fifteen years ago!) by 3eae33412d18c4a4a4a8592898b3e65ad5946a89 so don't declare them as friends.

---
Full diff: https://github.com/llvm/llvm-project/pull/180188.diff


2 Files Affected:

- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h (-2) 
- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h (-1) 


``````````diff
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 75a24827d3e03..96ddd12b286a6 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -48,8 +48,6 @@ class ExprEngine;
 /// CoreEngine - Implements the core logic of the graph-reachability analysis.
 /// It traverses the CFG and generates the ExplodedGraph.
 class CoreEngine {
-  friend class CommonNodeBuilder;
-  friend class EndOfFunctionNodeBuilder;
   friend class ExprEngine;
   friend class IndirectGotoNodeBuilder;
   friend class NodeBuilder;
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index bd11e0d40cfa9..29c252472b93d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -66,7 +66,6 @@ class ExplodedGraph;
 class ExplodedNode : public llvm::FoldingSetNode {
   friend class BranchNodeBuilder;
   friend class CoreEngine;
-  friend class EndOfFunctionNodeBuilder;
   friend class ExplodedGraph;
   friend class IndirectGotoNodeBuilder;
   friend class NodeBuilder;

``````````

</details>


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


More information about the cfe-commits mailing list