[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 11:59:35 PST 2020
cchen marked 2 inline comments as done.
cchen added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9965
"memory order clause '%0' is specified here">;
+def err_omp_non_lvalue_in_map_or_motion_clauses: Error<
+ "expected lvalue with no function call in '#pragma omp target update' and '#pragma omp target map'"
----------------
ABataev wrote:
> ABataev wrote:
> > I would say that this lvalue must be addressable, no? Also, some function calls can be handled, probably, those returning rvalues, for example, or constexprs.
> Fix this message, please, it is not quite correct.
Will fix this, thanks.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7616-7633
+ const auto *UO = dyn_cast<UnaryOperator>(I->getAssociatedExpression());
+ const auto *BO = dyn_cast<BinaryOperator>(I->getAssociatedExpression());
bool IsPointer =
(OASE && OMPArraySectionExpr::getBaseOriginalType(OASE)
.getCanonicalType()
->isAnyPointerType()) ||
I->getAssociatedExpression()->getType()->isAnyPointerType();
----------------
ABataev wrote:
> Do you have the tests for these changes?
I think target_update_codegen.cpp has already tested those.
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