clang/test/CIR/IR/invalid-throw.cir
raw| 1 | // RUN: cir-opt %s -verify-diagnostics -split-input-file |
| 2 | |
| 3 | !s32i = !cir.int<s, 32> |
| 4 | |
| 5 | module { |
| 6 | |
| 7 | cir.func dso_local @throw_without_type_info() { |
| 8 | %0 = cir.alloca !s32i, !cir.ptr<!s32i>, ["a"] |
| 9 | // expected-error @below {{'cir.throw' op 'type_info' symbol attribute missing}} |
| 10 | cir.throw %0 : !cir.ptr<!s32i> |
| 11 | cir.unreachable |
| 12 | ^bb1: |
| 13 | cir.return |
| 14 | } |
| 15 | |
| 16 | } |