[clang] [analyzer] Turn NodeBuilderContext into a class (PR #84638)

Diego A. Estrada Rivera via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 9 08:27:18 PST 2024


https://github.com/diego-est created https://github.com/llvm/llvm-project/pull/84638

>From issue #73088. I changed `NodeBuilderContext` into a class. Additionally, there were some other mentions of the former being a struct which I also changed into a class. This is my first time working with an issue so I will be open to hearing any advice or changes that need to be done.

>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas <diego.estrada1 at proton.me>
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH] [analyzer] Turn NodeBuilderContext into a class

---
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 8e392421fef9bb..24d4afc551355e 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -59,7 +59,7 @@ class CoreEngine {
   friend class ExprEngine;
   friend class IndirectGotoNodeBuilder;
   friend class NodeBuilder;
-  friend struct NodeBuilderContext;
+  friend class NodeBuilderContext;
   friend class SwitchNodeBuilder;
 
 public:
@@ -194,7 +194,8 @@ class CoreEngine {
 };
 
 // TODO: Turn into a class.
-struct NodeBuilderContext {
+class NodeBuilderContext {
+public:
   const CoreEngine &Eng;
   const CFGBlock *Block;
   const LocationContext *LC;



More information about the cfe-commits mailing list