summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp6
-rw-r--r--clang/lib/CodeGen/CodeGenTypes.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index f6573091776..106170fe6d7 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -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));
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp
index 1ec6607ccc2..fe103f47af7 100644
--- a/clang/lib/CodeGen/CodeGenTypes.cpp
+++ b/clang/lib/CodeGen/CodeGenTypes.cpp
@@ -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)) {
OpenPOWER on IntegriCloud