[clang] [analyzer][NFC] Fix typo in `exploredAllPaths` variable & predicate (PR #220588)
Marco Milanese via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 2 06:14:00 PDT 2026
https://github.com/marco-milanese-sonarsource created https://github.com/llvm/llvm-project/pull/220588
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.
>From 765cb016953ba30e1bdf6bd8d8c3775dd353915b Mon Sep 17 00:00:00 2001
From: Marco Milanese <marco.milanese at sonarsource.com>
Date: Wed, 2 Sep 2026 15:06:53 +0200
Subject: [PATCH] [analyzer][NFC] Fix typo in `exploredAllPaths` variable &
predicate
---
.../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 6 +++---
.../clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 2 +-
.../lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp | 2 +-
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
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..2e891cae75f1c 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -467,7 +467,7 @@ 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;
More information about the cfe-commits
mailing list