[clang] [SSAF] Fix -Wunused-variable (PR #195975)

Aiden Grossman via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 18:42:12 PDT 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/195975

Add [[maybe_unused]] given the operation is side effecting/returns
multiple values.

>From ce910bfbc0f563538915a5effc344b144491a956 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 6 May 2026 01:40:00 +0000
Subject: [PATCH] [SSAF] Fix -Wunused-variable

Add [[maybe_unused]] given the operation is side effecting/returns
multiple values.
---
 .../Analyses/PointerFlow/PointerFlowExtractor.cpp               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp b/clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
index cd6468e543fda..473ce5b11ae5b 100644
--- a/clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+++ b/clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
@@ -347,7 +347,7 @@ class PointerFlowTUSummaryExtractor : public TUSummaryExtractor {
       if (!ContributorName)
         llvm::reportFatalInternalError(makeEntityNameErr(Ctx, CD));
 
-      auto [_, InsertionSucceeded] = SummaryBuilder.addSummary(
+      [[maybe_unused]] auto [_, InsertionSucceeded] = SummaryBuilder.addSummary(
           addEntity(*ContributorName), std::move(*EntitySummary));
 
       assert(InsertionSucceeded && "duplicated contributor extraction");



More information about the cfe-commits mailing list