================
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) 
__arm_preserves("zt0") __ar
 // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}}
 // expected-error@+1 {{conflicting attributes for state 'zt0'}}
 void conflicting_state_attrs_preserves_inout_zt0(void) __arm_preserves("zt0") 
__arm_inout("zt0");
+
----------------
sdesmalen-arm wrote:

I just wrote some tests manually with all combinations of n (normal), s 
(streaming), sc (streaming-compatible) and see the current behaviour isn't 
entirely correct. See the FIXME's below.

It also shows that there isn't enough test-coverage in your patch.

```
typedef __SVInt32_t sv_ty;

void n(sv_ty arg);
void sc(sv_ty arg) __arm_streaming_compatible;
void s(sv_ty arg) __arm_streaming;

void test_n_to_n(sv_ty arg) { n(arg); }
void test_n_to_sc(sv_ty arg) { sc(arg); }
void test_n_to_s(sv_ty arg) { s(arg); }   // expect a diagnostic

void test_sc_to_n(sv_ty arg) __arm_streaming_compatible { n(arg); }     // 
expect a diagnostic
void test_sc_to_sc(sv_ty arg) __arm_streaming_compatible { sc(arg); }
void test_sc_to_s(sv_ty arg) __arm_streaming_compatible { s(arg); }     // 
expect a diagnostic (FIXME: missing diagnostic)

void test_s_to_n(sv_ty arg) __arm_streaming { n(arg); }   // expect a diagnostic
void test_s_to_sc(sv_ty arg) __arm_streaming { sc(arg); }   // FIXME: should 
not see a diagnostic for this case.
void test_s_to_s(sv_ty arg) __arm_streaming { s(arg); }

__arm_locally_streaming void ls_arg(sv_ty arg) { }  // expect a diagnostic
__arm_locally_streaming sv_ty ls_ret() { return {}; }  // expect a diagnostic
```

https://github.com/llvm/llvm-project/pull/79842
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to