summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGOpenMPRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntime.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 33dfe71dff0..0500f23b3d9 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -898,6 +898,9 @@ static void EmitOMPAggregateInit(CodeGenFunction &CGF, Address DestAddr,
static llvm::Optional<OMPDeclareTargetDeclAttr::MapTypeTy>
isDeclareTargetDeclaration(const ValueDecl *VD) {
+ if (const auto *MD = dyn_cast<CXXMethodDecl>(VD))
+ if (!MD->isStatic())
+ return llvm::None;
for (const Decl *D : VD->redecls()) {
if (!D->hasAttrs())
continue;
OpenPOWER on IntegriCloud