aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-06-04 19:01:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-22 18:22:50 +0000
commit2efbaac7a07fff163640a67873b3ac250794ec3f (patch)
tree6773547d294a46d478a9afe78e381b94d52c1944 /contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
parenta324c34037ef2e1101962fca4ad0c021253288e1 (diff)
parent3b922bd9516f6dc5146815ed8d4363fcbe97997f (diff)
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
index 051fad04219f..0fbef1cc8b52 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
@@ -8693,7 +8693,7 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
}
// Check that SVE types are only used in functions with SVE available.
- if (T->isSVESizelessBuiltinType() && CurContext->isFunctionOrMethod()) {
+ if (T->isSVESizelessBuiltinType() && isa<FunctionDecl>(CurContext)) {
const FunctionDecl *FD = cast<FunctionDecl>(CurContext);
llvm::StringMap<bool> CallerFeatureMap;
Context.getFunctionFeatureMap(CallerFeatureMap, FD);