[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap
Chi Chun Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 12:53:00 PST 2019
cchen marked an inline comment as done.
cchen added inline comments.
================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:2343-2344
+ // pointer
+ if (Arg.back() < OMPC_DEFAULTMAP_MODIFIER_unknown)
+ Arg.back() = OMPC_DEFAULTMAP_MODIFIER_unknown;
KLoc.push_back(Tok.getLocation());
----------------
ABataev wrote:
> Is this possible at all? I think it must an assertion rather this kind of trick.
This is definitely possible since the `getOpenMPSimpleClauseType` function in OpenMPKinds.cpp, parse defaultmap modifier and defaultmap kind in a same stringswitch statement, so for `defaultmap(scalar`, it will set the defaultmap modifier to be 0, however, the unknown is 3 (OMPC_DEFAULTMAP_MODIFIER_unknown == OMPC_DEFAULTMAP_unknown).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69204/new/
https://reviews.llvm.org/D69204
More information about the cfe-commits
mailing list