Skip to content

Commit 82728d3

Browse files
authored
Merge pull request #31808 from gottesmm/pr-b5aedd90dfc12a3be8e463e234898c646c5e654a
[gardening] Propagate type info to silence static analyzer nullptr error.
2 parents 01dcc29 + d60d6dd commit 82728d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ SILCombiner::optimizeApplyOfConvertFunctionInst(FullApplySite AI,
207207
// we got this far it is legal to perform the transformation (since
208208
// otherwise, we would be creating malformed SIL).
209209
bool setNonThrowing = FRI->getFunctionType()->hasErrorResult();
210-
SILInstruction *NAI = Builder.createApply(AI.getLoc(), FRI, SubstitutionMap(),
211-
Args, setNonThrowing);
212-
assert(FullApplySite::isa(NAI).getSubstCalleeType()->getAllResultsSubstType(
210+
ApplyInst *NAI = Builder.createApply(AI.getLoc(), FRI, SubstitutionMap(),
211+
Args, setNonThrowing);
212+
assert(FullApplySite(NAI).getSubstCalleeType()->getAllResultsSubstType(
213213
AI.getModule(), AI.getFunction()->getTypeExpansionContext()) ==
214214
AI.getSubstCalleeType()->getAllResultsSubstType(
215215
AI.getModule(), AI.getFunction()->getTypeExpansionContext()) &&

0 commit comments

Comments
 (0)