]> granicus.if.org Git - clang/commitdiff
Fix unused variable warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Dec 2016 22:45:21 +0000 (22:45 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Dec 2016 22:45:21 +0000 (22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289285 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CodeGenTypes.cpp

index f657309177683df375f2c54b69cfac34fdd6a602..106170fe6d7d7b1cc1e48872a40a40fe74394400 100644 (file)
@@ -1617,9 +1617,9 @@ static llvm::Constant *EmitNullConstantForBase(CodeGenModule &CGM,
 }
 
 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));
index 1ec6607ccc242e64fe2925eb97d08d1e1f46ed29..fe103f47af71b4ed4fa8cb46c14ccf14c3017734 100644 (file)
@@ -742,7 +742,7 @@ bool CodeGenTypes::isPointerZeroInitializable(QualType T) {
 }
 
 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)) {