[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 06:23:01 PST 2024


================
@@ -23352,6 +23352,15 @@ void Sema::ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc,
           isa<FunctionTemplateDecl>(ND)) &&
          "Expected variable, function or function template.");
 
+  if (auto *VD = dyn_cast<VarDecl>(ND)) {
----------------
alexey-bataev wrote:

checkDeclIsAllowedInOpenMPTarget should handle it

https://github.com/llvm/llvm-project/pull/83223


More information about the cfe-commits mailing list