================
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const 
FunctionProtoType *Proto,
       }
     }
 
+    auto *CallerFD = dyn_cast<FunctionDecl>(CurContext);
+    if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") &&
----------------
sdesmalen-arm wrote:

This code requires that the function definition is available (`if (FD && 
...)`), but the streaming mode is exposed through the interface, meaning that 
we shouldn't need `FD` in order to emit a diagnostic.

For example:
```
// I would expect a warning here.
void test_n_to_s(
    __SVInt32_t arg, void (*sc)(__SVInt32_t arg) __arm_streaming) {
  sc(arg);
}
```

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