Skip to content

Commit

Permalink
[polly] Fix cppcheck SA comment reported in llvm#91235 (llvm#93505)
Browse files Browse the repository at this point in the history
This patch moves the unreachable assert before return statement.
Fixes llvm#91235.
  • Loading branch information
kartcq authored May 28, 2024
1 parent 08de0b3 commit d33864d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polly/include/polly/ScheduleTreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ struct ScheduleTreeVisitor {
return getDerived().visitSequence(Node.as<isl::schedule_node_sequence>(),
std::forward<Args>(args)...);
case isl_schedule_node_set:
assert(isl_schedule_node_n_children(Node.get()) >= 2);
return getDerived().visitSet(Node.as<isl::schedule_node_set>(),
std::forward<Args>(args)...);
assert(isl_schedule_node_n_children(Node.get()) >= 2);
case isl_schedule_node_leaf:
assert(isl_schedule_node_n_children(Node.get()) == 0);
return getDerived().visitLeaf(Node.as<isl::schedule_node_leaf>(),
Expand Down

0 comments on commit d33864d

Please sign in to comment.