File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -8693,7 +8693,7 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
8693
8693
}
8694
8694
8695
8695
// Check that SVE types are only used in functions with SVE available.
8696
- if (T->isSVESizelessBuiltinType() && CurContext->isFunctionOrMethod( )) {
8696
+ if (T->isSVESizelessBuiltinType() && isa<FunctionDecl>(CurContext )) {
8697
8697
const FunctionDecl *FD = cast<FunctionDecl>(CurContext);
8698
8698
llvm::StringMap<bool> CallerFeatureMap;
8699
8699
Context.getFunctionFeatureMap(CallerFeatureMap, FD);
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -fopenmp -fsyntax-only -triple aarch64-arm-none-eabi -target-feature +sve -verify %s
2
+ // expected-no-diagnostics
3
+
4
+ __SVBool_t foo (int );
5
+
6
+ void test () {
7
+ #pragma omp parallel
8
+ {
9
+ __SVBool_t pg = foo (1 );
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments