File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -8705,7 +8705,7 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
8705
8705
}
8706
8706
8707
8707
// Check that SVE types are only used in functions with SVE available.
8708
- if (T->isSVESizelessBuiltinType() && CurContext->isFunctionOrMethod( )) {
8708
+ if (T->isSVESizelessBuiltinType() && isa<FunctionDecl>(CurContext )) {
8709
8709
const FunctionDecl *FD = cast<FunctionDecl>(CurContext);
8710
8710
llvm::StringMap<bool> CallerFeatureMap;
8711
8711
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