llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Marco Milanese (marco-milanese-sonarsource)

<details>
<summary>Changes</summary>

During development of #<!-- -->219225 `hasWorkRemaining` was accidentally 
renamed to `exploredAllSTUPaths`, but the correct name should contain a `not`, 
i.e., `notExploredAllSTUPaths` which matches the polarity of `hasWorkRemaining`.

Perform an exhaustive renaming of all occurrences.

--
CPP-8856

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


4 Files Affected:

- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
(+3-3) 
- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h 
(+3-1) 
- (modified) clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp 
(+1-1) 
- (modified) clang/lib/StaticAnalyzer/Core/CoreEngine.cpp (+1-1) 


``````````diff
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 67bd1504d5ffb..05091c8ad64da 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -84,7 +84,7 @@ class CoreEngine {
 
   /// Whether the single-TU phase ran out of budget with work left over.
   /// The CTU phase replaces \c WList, so this has to be remembered separately.
-  bool exploredAllSTUPaths = false;
+  bool notExploredAllSTUPaths = false;
 
   /// The information about functions shared by the whole translation unit.
   /// (This data is owned by AnalysisConsumer.)
@@ -150,8 +150,8 @@ class CoreEngine {
   // Functions for external checking of whether we have unfinished work.
   bool wasBlockAborted() const { return !blocksAborted.empty(); }
   bool wasBlocksExhausted() const { return !blocksExhausted.empty(); }
-  bool hasExploredAllPaths() const {
-    return wasBlocksExhausted() || WList->hasWork() || exploredAllSTUPaths ||
+  bool hasNotExploredAllPaths() const {
+    return wasBlocksExhausted() || WList->hasWork() || notExploredAllSTUPaths 
||
            wasBlockAborted();
   }
 
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index 195d63b0e0936..f3a2abe86bc64 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -467,7 +467,9 @@ class ExprEngine {
   // Functions for external checking of whether we have unfinished work.
   bool wasBlocksExhausted() const { return Engine.wasBlocksExhausted(); }
   bool hasEmptyWorkList() const { return !Engine.getWorkList()->hasWork(); }
-  bool hasExploredAllPaths() const { return Engine.hasExploredAllPaths(); }
+  bool hasNotExploredAllPaths() const {
+    return Engine.hasNotExploredAllPaths();
+  }
 
   const CoreEngine &getCoreEngine() const { return Engine; }
 
diff --git a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
index 57b079e40e6c4..3d2a2aa6d8b1c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -51,7 +51,7 @@ void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph 
&G,
                                               ExprEngine &Eng) const {
   CFGBlocksSet reachable, visited;
 
-  if (Eng.hasExploredAllPaths())
+  if (Eng.hasNotExploredAllPaths())
     return;
 
   const Decl *D = nullptr;
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp 
b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
index 593346b2354a1..f0de0e141cc59 100644
--- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -161,7 +161,7 @@ bool CoreEngine::ExecuteWorkList(const StackFrame *SF, 
unsigned MaxSteps,
     return MaxSteps - Steps;
   };
   const unsigned STUSteps = ProcessWList(MaxSteps);
-  exploredAllSTUPaths = WList->hasWork();
+  notExploredAllSTUPaths = WList->hasWork();
 
   if (CTUWList) {
     NumSTUSteps += STUSteps;

``````````

</details>


https://github.com/llvm/llvm-project/pull/220588
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to