================ @@ -12230,12 +12230,22 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, } // Check if the function definition uses any AArch64 SME features without - // having the '+sme' feature enabled. + // having the '+sme' feature enabled and warn user if sme locally streaming + // function returns or uses arguments with VL-based types. if (DeclIsDefn) { const auto *Attr = NewFD->getAttr<ArmNewAttr>(); bool UsesSM = NewFD->hasAttr<ArmLocallyStreamingAttr>(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + + if (UsesSM) { ---------------- sdesmalen-arm wrote:
Please write this without using `UsesSM`, since that variable is updated further down the line. It seems better to explicitly for `NewFD->hasAttr<ArmLocallyStreamingAttr>()`. 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