[PATCH] D89385: [Flang][OpenMP 4.5] Add semantic check for OpenMP copyin clause
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 16:50:31 PDT 2020
kiranchandramohan added a comment.
Thanks @praveen for this patch. Can you add a few positive tests as well?
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:226-239
+ return true;
+ }
+
+ bool Pre(const parser::OpenMPDeclarativeConstruct &x) {
+ std::visit(common::visitors{
+ [&](const parser::OpenMPThreadprivate &construct) {
+ if (Pre(construct))
----------------
Why is this change required?
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:976
+ CheckDataCopyingClause(*name, *symbol, ompFlag);
+ return;
+ }
----------------
Nit: I think in general early returns are not used widely in the code base.
================
Comment at: flang/test/Semantics/omp-copyin01.f90:11
+ integer :: a(10) , b(10)
+ common /cmn/j
+
----------------
Nit: a space before 'j'.
================
Comment at: flang/test/Semantics/omp-copyin02.f90:19
+ !$omp parallel copyin(/cmn/)
+ print* , a
+ !$omp end parallel
----------------
Nit: A space between print and *.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89385/new/
https://reviews.llvm.org/D89385
More information about the llvm-commits
mailing list