[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 9 03:17:48 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list