summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-10-06 23:40:43 +0000
committerHans Wennborg <hans@hanshq.net>2015-10-06 23:40:43 +0000
commitdcfba33481e0c52b07fe2d72833c229840e4cfd5 (patch)
treec3f144ed0bf2b992128e0944c45ef45f467c5de8 /clang/lib/CodeGen/CGBlocks.cpp
parent7735a6d07ac83620379273aa19566de172cf06c3 (diff)
downloadbcm5719-llvm-dcfba33481e0c52b07fe2d72833c229840e4cfd5.tar.gz
bcm5719-llvm-dcfba33481e0c52b07fe2d72833c229840e4cfd5.zip
Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups
Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13406 llvm-svn: 249484
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 70006b022eb..7644ab9beee 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1,4 +1,4 @@
-//===--- CGBlocks.cpp - Emit LLVM Code for declarations -------------------===//
+//===--- CGBlocks.cpp - Emit LLVM Code for declarations ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -78,7 +78,7 @@ static llvm::Constant *buildBlockDescriptor(CodeGenModule &CGM,
ASTContext &C = CGM.getContext();
llvm::Type *ulong = CGM.getTypes().ConvertType(C.UnsignedLongTy);
- llvm::Type *i8p = NULL;
+ llvm::Type *i8p = nullptr;
if (CGM.getLangOpts().OpenCL)
i8p =
llvm::Type::getInt8PtrTy(
@@ -232,7 +232,7 @@ namespace {
return getPrefOrder(left) < getPrefOrder(right);
}
-}
+} // end anonymous namespace
/// Determines if the given type is safe for constant capture in C++.
static bool isSafeForCXXConstantCapture(QualType type) {
@@ -943,7 +943,6 @@ llvm::Type *CodeGenModule::getGenericBlockLiteralType() {
return GenericBlockLiteralType;
}
-
RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr *E,
ReturnValueSlot ReturnValue) {
const BlockPointerType *BPT =
@@ -1305,7 +1304,6 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
}
*/
-
/// Generate the copy-helper function for a block closure object:
/// static void block_copy_helper(block_t *dst, block_t *src);
/// The runtime will have previously initialized 'dst' by doing a
@@ -2252,7 +2250,7 @@ namespace {
CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF);
}
};
-}
+} // end anonymous namespace
/// Enter a cleanup to destroy a __block variable. Note that this
/// cleanup should be a no-op if the variable hasn't left the stack
OpenPOWER on IntegriCloud