[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 16:33:47 PDT 2024
vitalybuka wrote:
Yes, its there
but it's too late
we can't cast to enum invalid values
it should be like:
```
unsigned MapType = 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 static_cast<>(MapType);
return OMPC_MAP_unkno
```
https://github.com/llvm/llvm-project/pull/90935
More information about the cfe-commits
mailing list