r289285 - Fix unused variable warnings. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 9 14:45:21 PST 2016


Author: rksimon
Date: Fri Dec  9 16:45:21 2016
New Revision: 289285

URL: http://llvm.org/viewvc/llvm-project?rev=289285&view=rev
Log:
Fix unused variable warnings. NFCI.

Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=289285&r1=289284&r2=289285&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Fri Dec  9 16:45:21 2016
@@ -1617,9 +1617,9 @@ static llvm::Constant *EmitNullConstantF
 }
 
 llvm::Constant *CodeGenModule::EmitNullConstant(QualType T) {
-  if (auto PT = T->getAs<PointerType>())
-    return getNullPointer(cast<llvm::PointerType>(getTypes().ConvertTypeForMem(T)),
-                      T);
+  if (T->getAs<PointerType>())
+    return getNullPointer(
+        cast<llvm::PointerType>(getTypes().ConvertTypeForMem(T)), T);
 
   if (getTypes().isZeroInitializable(T))
     return llvm::Constant::getNullValue(getTypes().ConvertTypeForMem(T));

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=289285&r1=289284&r2=289285&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Fri Dec  9 16:45:21 2016
@@ -742,7 +742,7 @@ bool CodeGenTypes::isPointerZeroInitiali
 }
 
 bool CodeGenTypes::isZeroInitializable(QualType T) {
-  if (auto PT = T->getAs<PointerType>())
+  if (T->getAs<PointerType>())
     return Context.getTargetNullPointerValue(T) == 0;
 
   if (const auto *AT = Context.getAsArrayType(T)) {




More information about the cfe-commits mailing list