[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


================
@@ -439,7 +439,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
       value = builder.getTrue(cgf.getLoc(e->getExprLoc()));
     } else if (type->isIntegerType()) {
       QualType promotedType;
-      bool canPerformLossyDemotionCheck = false;
+      [[maybe_unused]] bool canPerformLossyDemotionCheck = false;
----------------
andykaylor wrote:

This is written to but never read. It will be read when sanitizer support is added.

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


More information about the cfe-commits mailing list