diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 6220e86b544..896954fcf09 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -12962,7 +12962,7 @@ static void checkDeclInTargetContext(SourceLocation SL, SourceRange SR, if (!LD) LD = D; if (LD && !LD->hasAttr<OMPDeclareTargetDeclAttr>() && - (isa<VarDecl>(LD) || isa<FunctionDecl>(LD))) { + ((isa<VarDecl>(LD) && !isa<ParmVarDecl>(LD)) || isa<FunctionDecl>(LD))) { // Outlined declaration is not declared target. if (LD->isOutOfLine()) { SemaRef.Diag(LD->getLocation(), diag::warn_omp_not_in_target_context); |