diff options
| author | Andy Kaylor <akaylor@nvidia.com> | 2025-07-31 14:54:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 14:54:56 -0700 |
| commit | ba2edbd0c8d7a0199485d2969aebcc4de4a3d983 (patch) | |
| tree | 6bfd715ad4fde59675457e5be7df06d495aee901 /clang/lib/CIR/CodeGen/CIRGenFunction.cpp | |
| parent | e1d45b1b97c1f18e5a5fb9db8621ae4b34ba0ab1 (diff) | |
[CIR] Fix warnings related to unused variables in release builds (#151412)
This fixes a number of warnings in release builds due to variables that
were only being used in asserts. Some of these variables will later be
used in non-debug code, but for now they are unused in release builds.
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenFunction.cpp')
| -rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index 3e9de17e7a85..0c9bc3823f2f 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -216,8 +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); - assert(namedVar && "Needs a named decl"); + assert(isa<NamedDecl>(var) && "Needs a named decl"); assert(!cir::MissingFeatures::cgfSymbolTable()); auto allocaOp = cast<cir::AllocaOp>(addrVal.getDefiningOp()); |
