[llvm] c78acc9 - [NFC]Fix possibly derefer nullptr in ComplexDeinterleavingPass.cpp
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 20:26:24 PDT 2023
Author: Wang, Xin10
Date: 2023-06-28T23:26:09-04:00
New Revision: c78acc92759cda8fc6ecb2690df39c7ee65355bf
URL: https://github.com/llvm/llvm-project/commit/c78acc92759cda8fc6ecb2690df39c7ee65355bf
DIFF: https://github.com/llvm/llvm-project/commit/c78acc92759cda8fc6ecb2690df39c7ee65355bf.diff
LOG: [NFC]Fix possibly derefer nullptr in ComplexDeinterleavingPass.cpp
Fix static analyzer reports issue, add assert to avoid analyzer report.
Reviewed By: igor.kirillov
Differential Revision: https://reviews.llvm.org/D153942
Added:
Modified:
llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
index 08f2867703c10..2464ebab221d4 100644
--- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -1046,7 +1046,7 @@ ComplexDeinterleavingGraph::identifyReassocNodes(Instruction *Real,
if (!FinalNode)
return nullptr;
}
-
+ assert(FinalNode && "FinalNode can not be nullptr here");
// Set the Real and Imag fields of the final node and submit it
FinalNode->Real = Real;
FinalNode->Imag = Imag;
More information about the llvm-commits
mailing list