Author: Andy Kaylor
Date: 2025-12-02T20:29:04Z
New Revision: ca3de05eca474aaa7f53a62832a3c4cc80c5f43d

URL: 
https://github.com/llvm/llvm-project/commit/ca3de05eca474aaa7f53a62832a3c4cc80c5f43d
DIFF: 
https://github.com/llvm/llvm-project/commit/ca3de05eca474aaa7f53a62832a3c4cc80c5f43d.diff

LOG: [CIR][NFC] Fix a release build warning (#170359)

This moves a call inside an assert to avoid a warning about the result
variable being unused in release builds.

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenClass.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenClass.cpp 
b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
index c98d9bb0724f6..ca9fe939139cd 100644
--- a/clang/lib/CIR/CodeGen/CIRGenClass.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
@@ -126,8 +126,7 @@ static void emitMemberInitializer(CIRGenFunction &cgf,
                             lhs.isVolatileQualified());
       // Ensure that we destroy the objects if an exception is thrown later in
       // the constructor.
-      QualType::DestructionKind dtorKind = fieldType.isDestructedType();
-      assert(!cgf.needsEHCleanup(dtorKind) &&
+      assert(!cgf.needsEHCleanup(fieldType.isDestructedType()) &&
              "Arrays of non-record types shouldn't need EH cleanup");
       return;
     }


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to