File tree Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -3507,11 +3507,15 @@ bool Sema::ParseSVEImmChecks(
3507
3507
static ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) {
3508
3508
if (FD->hasAttr<ArmLocallyStreamingAttr>())
3509
3509
return ArmStreaming;
3510
- if (const auto *T = FD->getType()->getAs<FunctionProtoType>()) {
3511
- if (T->getAArch64SMEAttributes() & FunctionType::SME_PStateSMEnabledMask)
3512
- return ArmStreaming;
3513
- if (T->getAArch64SMEAttributes() & FunctionType::SME_PStateSMCompatibleMask)
3514
- return ArmStreamingCompatible;
3510
+ if (const Type *Ty = FD->getType().getTypePtrOrNull()) {
3511
+ if (const auto *FPT = Ty->getAs<FunctionProtoType>()) {
3512
+ if (FPT->getAArch64SMEAttributes() &
3513
+ FunctionType::SME_PStateSMEnabledMask)
3514
+ return ArmStreaming;
3515
+ if (FPT->getAArch64SMEAttributes() &
3516
+ FunctionType::SME_PStateSMCompatibleMask)
3517
+ return ArmStreamingCompatible;
3518
+ }
3515
3519
}
3516
3520
return ArmNonStreaming;
3517
3521
}
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fsyntax-only %s
2
+
3
+ // REQUIRES: aarch64-registered-target || arm-registered-target
4
+
5
+ // expected-no-diagnostics
6
+
7
+ struct a {};
8
+ __SVFloat32_t b (a);
9
+ template <class c > using e = decltype (b(c()));
10
+ e<a> f (a);
11
+ template <class c > using h = decltype (f(c()));
12
+ template <class g > struct i {
13
+ static void j () {
14
+ a d;
15
+ g ()(d);
16
+ }
17
+ };
18
+ struct k {
19
+ template <class c > void operator ()(c) {
20
+ [](h<c>) {};
21
+ }
22
+ void l () { i<k>::j; }
23
+ };
You can’t perform that action at this time.
0 commit comments