[clang] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 (PR #131617)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 06:57:44 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Balazs Benics (steakhal)
<details>
<summary>Changes</summary>
Fixes https://github.com/llvm/llvm-project/pull/131175#discussion_r1998764727
---
Full diff: https://github.com/llvm/llvm-project/pull/131617.diff
1 Files Affected:
- (modified) clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp (+1-1)
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp b/clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp
index 617002cce90eb..b7f9044f65308 100644
--- a/clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp
+++ b/clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp
@@ -80,7 +80,7 @@ void EntryPointStat::lockRegistry() {
StatsRegistry->IsLocked = true;
}
-static bool isRegistered(llvm::StringLiteral Name) {
+[[maybe_unused]] static bool isRegistered(llvm::StringLiteral Name) {
auto ByName = [Name](const EntryPointStat *M) { return M->name() == Name; };
bool Result = false;
enumerateStatVectors([ByName, &Result](const auto &Stats) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/131617
More information about the cfe-commits
mailing list