Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 #131617

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

steakhal
Copy link
Contributor

@steakhal
Copy link
Contributor Author

CC @necto

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Mar 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 17, 2025

@llvm/pr-subscribers-clang

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

Author: Balazs Benics (steakhal)

Changes

Fixes #131175 (comment)


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

1 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp (+1-1)
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) {

Copy link
Collaborator

@mikaelholmen mikaelholmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@steakhal steakhal merged commit 19adc69 into llvm:main Mar 17, 2025
9 of 13 checks passed
@steakhal steakhal deleted the add-maybe-unused branch March 17, 2025 14:00
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 17, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-win running on avx512-intel64-win while building clang at step 4 "cmake stage 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/5323

Here is the relevant piece of the build log for the reference
Step 4 (cmake stage 1) failure: 'cmake -G ...' (failure)
'cmake' is not recognized as an internal or external command,
operable program or batch file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:static analyzer clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants