[OPENMP] Do not emit warning about non-declared target function params.

We should not emit warning that the parameters are not marked as declare
target, these declaration are local and cannot be marked as declare
target.

llvm-svn: 331211
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 6220e86..896954f 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -12962,7 +12962,7 @@
   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);