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

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 08:42:01 PST 2020


cchen marked an inline comment as done.
cchen added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15683
   }
+  bool VisitUnaryOperator(UnaryOperator *UO) {
+    if (SemaRef.getLangOpts().OpenMP < 50) {
----------------
ABataev wrote:
> cchen wrote:
> > ABataev wrote:
> > > I think you need to extend this to support paren expressions, at least.
> > I have `UO->getSubExpr()->IgnoreParenImpCasts()` here, or I might not understand what you mean by "support paren expression".
> `(*(..))` is not supported, I think. Or, maybe, `*((a)+b)`
Both cases are handled correctly. For `(*((b)+a))`, the binop in `VisitBinaryOperator()`does not include the outer paren and for `*((a)+b)`, the parens can be handled by `Expr *SubE = UO->getSubExpr()->IgnoreParenImpCasts();`.


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