[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
Tue Feb 25 10:18:59 PST 2020
cchen marked 6 inline comments as done.
cchen added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7633
+ isa<UnaryOperator>(Next->getAssociatedExpression()) ||
+ isa<BinaryOperator>(Next->getAssociatedExpression())) &&
"Unexpected expression");
----------------
I'm now not checking for isLValue here since the binary expression without unary operator is not an LValue.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15714-15718
+ if (RootT == LT)
+ Visit(LE);
+ else
+ Visit(RE);
+ return true;
----------------
ABataev wrote:
> This does not look correct. At least, it should return the result of one of `Visit()` calls. Plus, it seems to me, it won't handle something like `*(a+5)`. That's why I suggest excluding binary op from this patch, it is not complete.
Now return the result of `Visit()` calls. Also, this patch can handle `*(a+5)` or more complicated pointer arithmetic expression, such as CK6 and CK13 in target_update_codegen.cpp.
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