[clang] 4abb5cd - CGBlocks.cpp - assert non-null CGF pointer. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 04:35:32 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-16T12:30:24+01:00
New Revision: 4abb5cd83902f1351db473c720ee0b95ebdcb338
URL: https://github.com/llvm/llvm-project/commit/4abb5cd83902f1351db473c720ee0b95ebdcb338
DIFF: https://github.com/llvm/llvm-project/commit/4abb5cd83902f1351db473c720ee0b95ebdcb338.diff
LOG: CGBlocks.cpp - assert non-null CGF pointer. NFCI.
Fixes static analyzer warning.
Added:
Modified:
clang/lib/CodeGen/CGBlocks.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index ac5559a93d9cc..ee0c14641803b 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -580,7 +580,7 @@ static void computeBlockInfo(CodeGenModule &CGM, CodeGenFunction *CGF,
// Since a __block variable cannot be captured by lambdas, its type and
// the capture field type should always match.
- assert(getCaptureFieldType(*CGF, CI) == variable->getType() &&
+ assert(CGF && getCaptureFieldType(*CGF, CI) == variable->getType() &&
"capture type
diff ers from the variable type");
layout.push_back(BlockLayoutChunk(align, CGM.getPointerSize(),
Qualifiers::OCL_None, &CI,
More information about the cfe-commits
mailing list