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

2024-03-12 Thread Diego A. Estrada Rivera via cfe-commits

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

>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH 1/4] [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;

>From a87c924670e00e293ea31d5230c6131509ce26b1 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sun, 10 Mar 2024 21:24:23 -0400
Subject: [PATCH 2/4] fix(NodeBuilderContext implementation): changed class
 members to private and added the appropriate getters.

Moved every member in NodeBuilderContext to private and added the following 
getters:
- getEngine
- getLocationContext

Setters are not necessary since the class members are const already.
---
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h  | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 24d4afc551355e..0705affa4117d9 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -195,11 +195,11 @@ class CoreEngine {
 
 // TODO: Turn into a class.
 class NodeBuilderContext {
-public:
   const CoreEngine &Eng;
   const CFGBlock *Block;
   const LocationContext *LC;
 
+public:
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B,
  const LocationContext *L)
   : Eng(E), Block(B), LC(L) {
@@ -209,9 +209,15 @@ class NodeBuilderContext {
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B, ExplodedNode *N)
   : NodeBuilderContext(E, B, N->getLocationContext()) {}
 
+  /// Return the CoreEngine associated with this builder.
+  const CoreEngine &getEngine() const { return Eng; }
+
   /// Return the CFGBlock associated with this builder.
   const CFGBlock *getBlock() const { return Block; }
 
+  /// Return the location context associated with this builder.
+  const LocationContext *getLocationContext() const { return LC; }
+
   /// Returns the number of times the current basic block has been
   /// visited on the exploded graph path.
   unsigned blockCount() const {

>From 0d4adf0600c1a86b092fec52749bd781e0ecfd6d Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Tue, 12 Mar 2024 07:33:34 -0400
Subject: [PATCH 3/4] fix(NodeBuilderContext API): fixed accesses to
 NodeBuilderContext private member accesses.

The files CheckerManager.h, CoreEngine.h, ExprEngine.h and CoreEngine.cpp all 
had bad private member accesses.
---
 clang/include/clang/StaticAnalyzer/Core/CheckerManager.h| 2 +-
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h| 1 -
 .../clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h| 2 +-
 clang/lib/StaticAnalyzer/Core/CoreEngine.cpp| 6 +++---
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h 
b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
index a45ba1bc573e1e..ad25d18f280700 100644
--- a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -49,7 +49,7 @@ class ExplodedNodeSet;
 class ExprEngine;
 struct EvalCallOptions;
 class MemRegion;
-struct NodeBuilderContext;
+class NodeBuilderContext;
 class ObjCMethodCall;
 class RegionAndSymbolInvalidationTraits;
 class SVal;
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 0705affa4117d9..0ef353bf9731ca 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -193,7 +193,6 @@ class CoreEngine {
   DataTag::Factory &getDataTags() { return DataTags; }
 };
 
-// TODO: Turn into a class.
 class NodeBuilderContext {
   const CoreEngine &Eng;
   const CFGBlock *Block;
diff --git a/clang/include/clang/StaticAnalyzer/Co

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

2024-03-12 Thread Diego A. Estrada Rivera via cfe-commits

diego-est wrote:

Seems like it wasn't as easy as just making them private. I think I found all 
the places where there were private member accesses. The tests passed on my 
side again and the github-pull-requests action. The code_formatter action keeps 
failing because of the documentation on something I didn't touch (but seems to 
be fixed high upstream). Everything should be fixed now.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-12 Thread Diego A. Estrada Rivera via cfe-commits


@@ -194,11 +194,12 @@ class CoreEngine {
 };
 
 // TODO: Turn into a class.

diego-est wrote:

Done.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-12 Thread via cfe-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff 4fdf10faf2b45f4bbbd2ddfb07272d19a47cc531 
0d4adf0600c1a86b092fec52749bd781e0ecfd6d -- 
clang/include/clang/StaticAnalyzer/Core/CheckerManager.h 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h 
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
``





View the diff from clang-format here.


``diff
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp 
b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
index c141e26508..8605fa149e 100644
--- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -655,7 +655,7 @@ ExplodedNode 
*BranchNodeBuilder::generateNode(ProgramStateRef State,
   if (!isFeasible(branch))
 return nullptr;
 
-  ProgramPoint Loc = BlockEdge(C.getBlock(), branch ? DstT:DstF,
+  ProgramPoint Loc = BlockEdge(C.getBlock(), branch ? DstT : DstF,
NodePred->getLocationContext());
   ExplodedNode *Succ = generateNodeImpl(Loc, State, NodePred);
   return Succ;

``




https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-12 Thread Diego A. Estrada Rivera via cfe-commits

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

>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH 1/3] [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;

>From a87c924670e00e293ea31d5230c6131509ce26b1 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sun, 10 Mar 2024 21:24:23 -0400
Subject: [PATCH 2/3] fix(NodeBuilderContext implementation): changed class
 members to private and added the appropriate getters.

Moved every member in NodeBuilderContext to private and added the following 
getters:
- getEngine
- getLocationContext

Setters are not necessary since the class members are const already.
---
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h  | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 24d4afc551355e..0705affa4117d9 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -195,11 +195,11 @@ class CoreEngine {
 
 // TODO: Turn into a class.
 class NodeBuilderContext {
-public:
   const CoreEngine &Eng;
   const CFGBlock *Block;
   const LocationContext *LC;
 
+public:
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B,
  const LocationContext *L)
   : Eng(E), Block(B), LC(L) {
@@ -209,9 +209,15 @@ class NodeBuilderContext {
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B, ExplodedNode *N)
   : NodeBuilderContext(E, B, N->getLocationContext()) {}
 
+  /// Return the CoreEngine associated with this builder.
+  const CoreEngine &getEngine() const { return Eng; }
+
   /// Return the CFGBlock associated with this builder.
   const CFGBlock *getBlock() const { return Block; }
 
+  /// Return the location context associated with this builder.
+  const LocationContext *getLocationContext() const { return LC; }
+
   /// Returns the number of times the current basic block has been
   /// visited on the exploded graph path.
   unsigned blockCount() const {

>From 0d4adf0600c1a86b092fec52749bd781e0ecfd6d Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Tue, 12 Mar 2024 07:33:34 -0400
Subject: [PATCH 3/3] fix(NodeBuilderContext API): fixed accesses to
 NodeBuilderContext private member accesses.

The files CheckerManager.h, CoreEngine.h, ExprEngine.h and CoreEngine.cpp all 
had bad private member accesses.
---
 clang/include/clang/StaticAnalyzer/Core/CheckerManager.h| 2 +-
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h| 1 -
 .../clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h| 2 +-
 clang/lib/StaticAnalyzer/Core/CoreEngine.cpp| 6 +++---
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h 
b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
index a45ba1bc573e1e..ad25d18f280700 100644
--- a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -49,7 +49,7 @@ class ExplodedNodeSet;
 class ExprEngine;
 struct EvalCallOptions;
 class MemRegion;
-struct NodeBuilderContext;
+class NodeBuilderContext;
 class ObjCMethodCall;
 class RegionAndSymbolInvalidationTraits;
 class SVal;
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 0705affa4117d9..0ef353bf9731ca 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -193,7 +193,6 @@ class CoreEngine {
   DataTag::Factory &getDataTags() { return DataTags; }
 };
 
-// TODO: Turn into a class.
 class NodeBuilderContext {
   const CoreEngine &Eng;
   const CFGBlock *Block;
diff --git a/clang/include/clang/StaticAnalyzer/Co

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

2024-03-11 Thread Balazs Benics via cfe-commits


@@ -194,11 +194,12 @@ class CoreEngine {
 };
 
 // TODO: Turn into a class.

steakhal wrote:

Remove this TODO, as its completed.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-11 Thread Balazs Benics via cfe-commits

https://github.com/steakhal commented:

Alright. So we can simply mark all the members private. I was surprised a bit.
LGTM, but remove the TODO comment you fix.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-11 Thread Balazs Benics via cfe-commits

https://github.com/steakhal edited 
https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-10 Thread Diego A. Estrada Rivera via cfe-commits

diego-est wrote:

I added the appropriate functions and moved the class members into private. 
Additionally I ran `make check-all` to make sure the now-private members 
wouldn't cause any issues with the rest of the codebase, all the checks passed.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-10 Thread Diego A. Estrada Rivera via cfe-commits

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

>From 114e22388508cd1ef5174bdda041564691b58032 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sat, 9 Mar 2024 12:23:43 -0400
Subject: [PATCH 1/2] [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;

>From a87c924670e00e293ea31d5230c6131509ce26b1 Mon Sep 17 00:00:00 2001
From: Sunglas 
Date: Sun, 10 Mar 2024 21:24:23 -0400
Subject: [PATCH 2/2] fix(NodeBuilderContext implementation): changed class
 members to private and added the appropriate getters.

Moved every member in NodeBuilderContext to private and added the following 
getters:
- getEngine
- getLocationContext

Setters are not necessary since the class members are const already.
---
 .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h  | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 24d4afc551355e..0705affa4117d9 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -195,11 +195,11 @@ class CoreEngine {
 
 // TODO: Turn into a class.
 class NodeBuilderContext {
-public:
   const CoreEngine &Eng;
   const CFGBlock *Block;
   const LocationContext *LC;
 
+public:
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B,
  const LocationContext *L)
   : Eng(E), Block(B), LC(L) {
@@ -209,9 +209,15 @@ class NodeBuilderContext {
   NodeBuilderContext(const CoreEngine &E, const CFGBlock *B, ExplodedNode *N)
   : NodeBuilderContext(E, B, N->getLocationContext()) {}
 
+  /// Return the CoreEngine associated with this builder.
+  const CoreEngine &getEngine() const { return Eng; }
+
   /// Return the CFGBlock associated with this builder.
   const CFGBlock *getBlock() const { return Block; }
 
+  /// Return the location context associated with this builder.
+  const LocationContext *getLocationContext() const { return LC; }
+
   /// Returns the number of times the current basic block has been
   /// visited on the exploded graph path.
   unsigned blockCount() const {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-10 Thread Balazs Benics via cfe-commits

https://github.com/steakhal requested changes to this pull request.

See my previous reply.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-10 Thread Balazs Benics via cfe-commits

steakhal wrote:

Thanks for the PR.
I think it would make sense to not expose data members in a class' public api.
We might need some member functions along the way to make this possible.

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-09 Thread via cfe-commits

llvmbot wrote:



@llvm/pr-subscribers-clang-static-analyzer-1

@llvm/pr-subscribers-clang

Author: Diego A. Estrada Rivera (diego-est)


Changes

>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.

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


1 Files Affected:

- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
(+3-2) 


``diff
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;

``




https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-09 Thread via cfe-commits

github-actions[bot] wrote:



Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this 
page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using `@` followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from 
other developers.

If you have further questions, they may be answered by the [LLVM GitHub User 
Guide](https://llvm.org/docs/GitHub.html).

You can also ask questions in a comment on this PR, on the [LLVM 
Discord](https://discord.com/invite/xS7Z362) or on the 
[forums](https://discourse.llvm.org/).

https://github.com/llvm/llvm-project/pull/84638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-03-09 Thread Diego A. Estrada Rivera via cfe-commits

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 
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;

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits