[flang-commits] [flang] [flang] Fix unused variable error (NFC) (PR #188358)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Wed Mar 25 10:47:46 PDT 2026


================
@@ -535,10 +535,11 @@ void DataSharingProcessor::collectPrivatizedSymbols(
   };
 
   llvm::SetVector<const semantics::Scope *> clauseScopes;
-  const semantics::Scope *curScope = collectScopes(semaCtx, eval, clauseScopes);
+  [[maybe_unused]] const semantics::Scope *curScope =
+      collectScopes(semaCtx, eval, clauseScopes);
+  assert(curScope && "couldn't find current scope");
----------------
luporl wrote:

No, it looks good.

https://github.com/llvm/llvm-project/pull/188358


More information about the flang-commits mailing list