[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 27 13:30:34 PST 2020


ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15684-15685
+  bool VisitUnaryOperator(UnaryOperator *UO) {
+    if (SemaRef.getLangOpts().OpenMP < 50 || UO->getOpcode() != UO_Deref ||
+        !UO->isLValue()) {
+      emitErrorMsg();
----------------
ABataev wrote:
> `UO_Deref` is always r-value. So, `!UO->isLValue()` will be always triggered for `UO_Deref`. You can just exclude it from the condition.
Oops, sorry, wrong comment, thought about Addr_of, but you removed it already.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75077





More information about the cfe-commits mailing list