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

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 09:38:54 PDT 2019


ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:4463-4890
+
   if (AStmt && !CurContext->isDependentContext()) {
     assert(isa<CapturedStmt>(AStmt) && "Captured statement expected");
 
     // Check default data sharing attributes for referenced variables.
     DSAAttrChecker DSAChecker(DSAStack, *this, cast<CapturedStmt>(AStmt));
+
----------------
cchen wrote:
> cchen wrote:
> > ABataev wrote:
> > > The formatting changes better to put in a separate NFC patch if you think that this is required.
> > I don't really understand why adding a specific diagnostic message for defaultmap(none: x) is just a formatting change.  For defaultmap(none: x), we emit error message if there are no explicity specified data-sharing attributes, data mapping attributes, or is_device_ptr clause, while for default(none), we emit error message if there are no explicitly specified data-sharing attributes. So the message for defaultmap(none: x) should be different from default(none).
> Oh, my bad, you mean this new line. I'll delete it. Thanks
Yes, I was talking about new empty lines. Do not add them here and other places.


================
Comment at: clang/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp:55
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd defaultmap (tofrom, scalar // expected-error {{expected ')'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
+#pragma omp target teams distribute simd defaultmap (tofrom, scalar // expected-error {{expected ')'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected ['scalar', 'aggregate', 'pointer'] in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
----------------
We never used `[]` in messages, please remove them.


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