[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 13:37:53 PST 2019


ABataev added inline comments.


================
Comment at: clang/test/OpenMP/target_defaultmap_messages.cpp:49
+
+  #pragma omp target defaultmap(tofrom:scalar) defaultmap(to:scalar) // expected-error {{at most one defaultmap clause for each variable-category can appear on the directive}}
+  foo();
----------------
cchen wrote:
> ABataev wrote:
> > cchen wrote:
> > > ABataev wrote:
> > > > Same test case must exist for OpenMP 4.5
> > > This test is only for testing the new rule in OpenMP 5.0 which disallow duplicate variable-category in defaultmap. For OpenMP 4.5, only one defaultmap is allowed, and I think I didn't remove the test for that by this one.
> > We don't have such test for OpenMP 4.5 and it would be good to have it
> I'm glad to add the test (duplicate defaultmap) for OpenMP 4.5 defaultmap. But just to clarify, are you also saying that I should remove the `ifdef OMP5` and add the error message for OpenMP 4.5?
Yes, you can move ifdef lower and test it for both modes, 50 and 45. Also note, that the original message from OpenMP 4.5 must be emitted in 4.5 mode, not the new one from OpenMP 5.0


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69204





More information about the cfe-commits mailing list