[clang] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 (PR #131617)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 06:57:21 PDT 2025
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/131617
Fixes https://github.com/llvm/llvm-project/pull/131175#discussion_r1998764727
>From e00f2b1fd392079840e8b2b4876552e8e2223bea Mon Sep 17 00:00:00 2001
From: Balazs Benics <benicsbalazs at gmail.com>
Date: Mon, 17 Mar 2025 14:55:52 +0100
Subject: [PATCH] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251
---
clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
More information about the cfe-commits
mailing list