[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 15:56:25 PDT 2025
================
@@ -216,7 +216,7 @@ void CIRGenFunction::emitAndUpdateRetAlloca(QualType type, mlir::Location loc,
void CIRGenFunction::declare(mlir::Value addrVal, const Decl *var, QualType ty,
mlir::Location loc, CharUnits alignment,
bool isParam) {
- const auto *namedVar = dyn_cast_or_null<NamedDecl>(var);
+ [[maybe_unused]] const auto *namedVar = dyn_cast_or_null<NamedDecl>(var);
----------------
andykaylor wrote:
The assert can be rewritten to eliminate this one. I didn't notice that until now.
https://github.com/llvm/llvm-project/pull/151412
More information about the cfe-commits
mailing list