[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 3 13:58:04 PDT 2024


jyu2-git wrote:

Hi @vitalybuka, could you please check what in isMapType clang/lib/Parse/ParseOpenMP.cpp : 
Should look like following:
static OpenMPMapClauseKind isMapType(Parser &P) {
  Token Tok = P.getCurToken();
  // The map-type token can be either an identifier or the C++ delete keyword.
  if (!Tok.isOneOf(tok::identifier, tok::kw_delete))
    return OMPC_MAP_unknown;
  Preprocessor &PP = P.getPreprocessor();
  OpenMPMapClauseKind MapType =
      static_cast<OpenMPMapClauseKind>(getOpenMPSimpleClauseType(
          OMPC_map, PP.getSpelling(Tok), P.getLangOpts()));
  if (MapType == OMPC_MAP_to || MapType == OMPC_MAP_from ||
      MapType == OMPC_MAP_tofrom || MapType == OMPC_MAP_alloc ||
      MapType == OMPC_MAP_delete || MapType == OMPC_MAP_release)
    return MapType;
  return OMPC_MAP_unknown;
}

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


More information about the cfe-commits mailing list