Skip to content

Commit

Permalink
[luci/partition] Fix for staic analysis (#14577)
Browse files Browse the repository at this point in the history
This will fix for static analysis to check null and throw.

Signed-off-by: SaeHie Park <saehie.park@gmail.com>
  • Loading branch information
seanshpark authored Jan 22, 2025
1 parent 1c0586a commit 18da2eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/luci/partition/src/PartitionPModules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ std::unique_ptr<loco::Graph> clone_graph(loco::Graph *graph_org, luci::CloneCont

// clone inputs
auto inputs = graph_org->inputs();
assert(inputs);
if (inputs == nullptr)
throw std::runtime_error("clone_graph: graph has no inputs");
for (uint32_t n = 0; n < inputs->size(); ++n)
{
auto input_org = luci::input_node(graph_org, n);
Expand Down

0 comments on commit 18da2eb

Please sign in to comment.