Skip to content

Commit f8023e3

Browse files
committed
LowerExpectIntrinsic handlePhiDef - silence static analyzer dyn_cast<PHINode> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<PHINode> directly and if not assert will fire for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373481 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 39472f2 commit f8023e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Transforms/Scalar/LowerExpectIntrinsic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static void handlePhiDef(CallInst *Expect) {
161161
return Result;
162162
};
163163

164-
auto *PhiDef = dyn_cast<PHINode>(V);
164+
auto *PhiDef = cast<PHINode>(V);
165165

166166
// Get the first dominating conditional branch of the operand
167167
// i's incoming block.

0 commit comments

Comments
 (0)