Skip to content

Commit d47933c

Browse files
- Removed static from CheckSMEFunctionDefAttributes
1 parent 02658f7 commit d47933c

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

clang/include/clang/Sema/SemaARM.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class SemaARM : public SemaBase {
8080
void handleCmseNSEntryAttr(Decl *D, const ParsedAttr &AL);
8181
void handleInterruptAttr(Decl *D, const ParsedAttr &AL);
8282

83-
static void CheckSMEFunctionDefAttributes(const FunctionDecl *FD, Sema &S);
83+
void CheckSMEFunctionDefAttributes(const FunctionDecl *FD);
8484
};
8585

8686
SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD);

clang/lib/Sema/SemaARM.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,22 +1331,22 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) {
13311331
// Check if the function definition uses any AArch64 SME features without
13321332
// having the '+sme' feature enabled and warn user if sme locally streaming
13331333
// function returns or uses arguments with VL-based types.
1334-
void SemaARM::CheckSMEFunctionDefAttributes(const FunctionDecl *FD, Sema &S) {
1334+
void SemaARM::CheckSMEFunctionDefAttributes(const FunctionDecl *FD) {
13351335
const auto *Attr = FD->getAttr<ArmNewAttr>();
13361336
bool UsesSM = FD->hasAttr<ArmLocallyStreamingAttr>();
13371337
bool UsesZA = Attr && Attr->isNewZA();
13381338
bool UsesZT0 = Attr && Attr->isNewZT0();
13391339

13401340
if (FD->hasAttr<ArmLocallyStreamingAttr>()) {
13411341
if (FD->getReturnType()->isSizelessVectorType())
1342-
S.Diag(FD->getLocation(),
1343-
diag::warn_sme_locally_streaming_has_vl_args_returns)
1342+
Diag(FD->getLocation(),
1343+
diag::warn_sme_locally_streaming_has_vl_args_returns)
13441344
<< /*IsArg=*/false;
13451345
if (llvm::any_of(FD->parameters(), [](ParmVarDecl *P) {
13461346
return P->getOriginalType()->isSizelessVectorType();
13471347
}))
1348-
S.Diag(FD->getLocation(),
1349-
diag::warn_sme_locally_streaming_has_vl_args_returns)
1348+
Diag(FD->getLocation(),
1349+
diag::warn_sme_locally_streaming_has_vl_args_returns)
13501350
<< /*IsArg=*/true;
13511351
}
13521352
if (const auto *FPT = FD->getType()->getAs<FunctionProtoType>()) {
@@ -1358,25 +1358,25 @@ void SemaARM::CheckSMEFunctionDefAttributes(const FunctionDecl *FD, Sema &S) {
13581358
FunctionType::ARM_None;
13591359
}
13601360

1361-
ASTContext &Context = S.getASTContext();
1361+
ASTContext &Context = getASTContext();
13621362
if (UsesSM || UsesZA) {
13631363
llvm::StringMap<bool> FeatureMap;
13641364
Context.getFunctionFeatureMap(FeatureMap, FD);
13651365
if (!FeatureMap.contains("sme")) {
13661366
if (UsesSM)
1367-
S.Diag(FD->getLocation(),
1368-
diag::err_sme_definition_using_sm_in_non_sme_target);
1367+
Diag(FD->getLocation(),
1368+
diag::err_sme_definition_using_sm_in_non_sme_target);
13691369
else
1370-
S.Diag(FD->getLocation(),
1371-
diag::err_sme_definition_using_za_in_non_sme_target);
1370+
Diag(FD->getLocation(),
1371+
diag::err_sme_definition_using_za_in_non_sme_target);
13721372
}
13731373
}
13741374
if (UsesZT0) {
13751375
llvm::StringMap<bool> FeatureMap;
13761376
Context.getFunctionFeatureMap(FeatureMap, FD);
13771377
if (!FeatureMap.contains("sme2")) {
1378-
S.Diag(FD->getLocation(),
1379-
diag::err_sme_definition_using_zt0_in_non_sme2_target);
1378+
Diag(FD->getLocation(),
1379+
diag::err_sme_definition_using_zt0_in_non_sme2_target);
13801380
}
13811381
}
13821382
}

clang/lib/Sema/SemaDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12288,7 +12288,7 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
1228812288
}
1228912289

1229012290
if (DeclIsDefn && Context.getTargetInfo().getTriple().isAArch64())
12291-
SemaARM::CheckSMEFunctionDefAttributes(NewFD, *this);
12291+
ARM().CheckSMEFunctionDefAttributes(NewFD);
1229212292

1229312293
return Redeclaration;
1229412294
}

clang/lib/Sema/SemaLambda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro,
14561456
ProcessDeclAttributes(CurScope, Method, ParamInfo);
14571457

14581458
if (Context.getTargetInfo().getTriple().isAArch64())
1459-
SemaARM::CheckSMEFunctionDefAttributes(Method, *this);
1459+
ARM().CheckSMEFunctionDefAttributes(Method);
14601460

14611461
// CUDA lambdas get implicit host and device attributes.
14621462
if (getLangOpts().CUDA)

0 commit comments

Comments
 (0)