[PATCH] D91373: [OpenMP5.0] Support more kinds of lvalues in map clauses

Jacob Weightman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 13 08:40:30 PST 2020


jacobdweightman added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:17141
+           Visit(ACO->getTrueExpr()->IgnoreParenImpCasts()) ||
+           Visit(ACO->getFalseExpr()->IgnoreParenImpCasts());
+  }
----------------
It looks like this short-circuits and the false expression doesn't get visited if the true expression is "well-formed." We probably want to emit diagnostics and fail if either expression is bad (i.e. visit true expression && visit false expression), but that results in an incorrect component list.

I suspect this may indicate a deeper issue, since I'm not sure what the components should actually be. It seems like in general it should be a tree-like structure rather than a list-like structure, but that seems like it may require significant changes. Any thoughts on this or suggestions for improvement?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91373



More information about the cfe-commits mailing list