[clang] a9ccb24 - [CIR][NFC] Fix an unused variable warning (#138110)

via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 09:49:50 PDT 2025


Author: Amr Hesham
Date: 2025-05-01T18:49:46+02:00
New Revision: a9ccb246178a454abba8fb53499012d586e5eea9

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

LOG: [CIR][NFC] Fix an unused variable warning (#138110)

This fixes a warning where a variable assigned in 'if' statement wasn't
referenced again.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index fa86fce2f6e5c..a424f7abd05c0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -519,7 +519,7 @@ LValue CIRGenFunction::emitLValue(const Expr *e) {
     return emitBinaryOperatorLValue(cast<BinaryOperator>(e));
   case Expr::CompoundAssignOperatorClass: {
     QualType ty = e->getType();
-    if (const AtomicType *at = ty->getAs<AtomicType>()) {
+    if (ty->getAs<AtomicType>()) {
       cgm.errorNYI(e->getSourceRange(),
                    "CompoundAssignOperator with AtomicType");
       return LValue();


        


More information about the cfe-commits mailing list