| 846 | } |
| 847 | |
| 848 | static bool is_global(instruction_ref ins) |
| 849 | { |
| 850 | auto aliases = instruction::get_output_alias(ins); |
| 851 | return std::any_of(aliases.begin(), aliases.end(), [](instruction_ref alias) { |
| 852 | const auto& op = alias->get_operator(); |
| 853 | return op.name() == "@param" or op.get_lifetime() == lifetime::global; |
| 854 | }); |
| 855 | } |
| 856 | |
| 857 | static bool is_dangling(instruction_ref ins) { return not is_global(ins) and is_borrowed(ins); } |
| 858 |
no test coverage detected