[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 11:21:36 PST 2025
================
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) {
ARMInterruptAttr(getASTContext(), AL, Kind));
}
+// Check if the function definition uses any AArch64 SME features without
+// having the '+sme' feature enabled and warn user if sme locally streaming
+// function returns or uses arguments with VL-based types.
+void SemaARM::CheckSMEFunctionDefAttributes(const FunctionDecl *FD) {
----------------
Endilll wrote:
It seems like an ARM-specific function, so you correctly placed it in `SemaARM`, and it's referenced in SemaDecl and SemaDeclCXX, so it can't be static. Corentin is correct that `ARM().CheckSMEFunctionDefAttributes(FD)` is the way to use it from outside of SemaARM.
The current state of the changes seems correct to me.
https://github.com/llvm/llvm-project/pull/121777
More information about the cfe-commits
mailing list