[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 09:12:08 PST 2023


doru1004 added inline comments.


================
Comment at: clang/test/OpenMP/target_map_messages.cpp:970-979
+  // ompx-error at +8 {{use of undeclared identifier 'itt'; did you mean 'it'?}}
+  // ompx-note at +7 {{'it' declared here}}
+  // omp-error at +6 {{use of undeclared identifier 'itt'; did you mean 'it'?}}
+  // omp-note at +5 {{'it' declared here}}
+  // ge51-ompx-error at +4 {{incorrect map type modifier, expected one of: 'always', 'close', 'mapper', 'present', 'ompx_hold'}}
+  // lt51-ompx-error at +3 {{incorrect map type modifier, expected one of: 'always', 'close', 'mapper', 'ompx_hold'}}
+  // ge51-omp-error at +2 {{incorrect map type modifier, expected one of: 'always', 'close', 'mapper', 'present'}}
----------------
ABataev wrote:
> doru1004 wrote:
> > ABataev wrote:
> > > Test cases for wrong variables in mappers?
> > You mean as part of the iterator ? like iterator(it = 0:UndefVar) ?
> I mean, you have a check that in mappers only iterator vars are allowed. Can you add a check for this?
As far as I understand it the additional check I added to the existing mapper checks is needed because of the way the mapper check was written. The mapper checks looks at declarations and if a mapper clause exists then it assumes that the declaration must be coming from that mapper clause. This used to hold in the past since that was the only way you could have a declaration. This is not true anymore since we can now have declarations coming from both the mapper and the iterator modifier. I'll add a test to showcase this.


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

https://reviews.llvm.org/D141871



More information about the cfe-commits mailing list