[clang] 89bf39b - [clang][CGExprConstant] Resolve unused variable 'C' warning
Bjorn Pettersson via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 23 05:27:47 PDT 2023
Author: Bjorn Pettersson
Date: 2023-08-23T14:27:13+02:00
New Revision: 89bf39b068e8bc51f4178d1e794fd78e8e86b508
URL: https://github.com/llvm/llvm-project/commit/89bf39b068e8bc51f4178d1e794fd78e8e86b508
DIFF: https://github.com/llvm/llvm-project/commit/89bf39b068e8bc51f4178d1e794fd78e8e86b508.diff
LOG: [clang][CGExprConstant] Resolve unused variable 'C' warning
Added:
Modified:
clang/lib/CodeGen/CGExprConstant.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 52d61f1e298087..2c847f0bb13fd2 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -1132,7 +1132,7 @@ class ConstExprEmitter :
return CGM.GetAddrOfConstantStringFromLiteral(S).getPointer();
return nullptr;
case CK_NullToPointer:
- if (llvm::Constant *C = Visit(subExpr, destType))
+ if (Visit(subExpr, destType))
return CGM.EmitNullConstant(destType);
return nullptr;
More information about the cfe-commits
mailing list