[PATCH] D84711: [OpenMP] Implement TR8 `present` motion modifier in Clang (1/2)

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 11:31:45 PDT 2020


ABataev added inline comments.


================
Comment at: clang/lib/Basic/OpenMPKinds.cpp:73-74
         .Default(OMPC_MOTION_MODIFIER_unknown);
+    if (OpenMPVersion < 51 && Type != OMPC_MOTION_MODIFIER_mapper)
+      return OMPC_MOTION_MODIFIER_unknown;
+    return Type;
----------------
Better to check for the new clauses here:
```
if (OpenMPVersion >= 51 && Type == OMPC_MOTION_MODIFIER_present)
....
```


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:3462
+      // OpenMP 5.1 accepts an optional ',' even if the next character is ':'.
+      // TODO: Is that intentional?
+      if (Tok.is(tok::comma))
----------------
`FIXME`. This is a bug.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:3476-3477
     }
+    // OpenMP 5.1 permits a ':' even without a preceding modifier.  TODO: Is
+    // that intentional?
+    if ((!Data.MotionModifiers.empty() || getLangOpts().OpenMP >= 51) &&
----------------
`FIXME`. A bug.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84711/new/

https://reviews.llvm.org/D84711



More information about the cfe-commits mailing list