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

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 09:17:43 PST 2019


cchen marked an inline comment as done.
cchen added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:4476
     }
-    if (!ImplicitMaps.empty()) {
-      CXXScopeSpec MapperIdScopeSpec;
-      DeclarationNameInfo MapperId;
-      if (OMPClause *Implicit = ActOnOpenMPMapClause(
-              llvm::None, llvm::None, MapperIdScopeSpec, MapperId,
-              OMPC_MAP_tofrom, /*IsMapTypeImplicit=*/true, SourceLocation(),
-              SourceLocation(), ImplicitMaps, OMPVarListLocTy())) {
-        ClausesWithImplicit.emplace_back(Implicit);
-        ErrorFound |=
-            cast<OMPMapClause>(Implicit)->varlist_size() != ImplicitMaps.size();
-      } else {
-        ErrorFound = true;
+    for (unsigned I = 0; I < OMPC_MAP_delete; I++) {
+      if (!ImplicitMaps[I].empty()) {
----------------
ABataev wrote:
> Use range-based loop here.
But in line 4480, I require the index of the iteration. If I use range based for loop, then I'll need to get the index like `addressof(ImplicitMap) - addressof(ImplicitMaps[0])`, which I'm not sure I should write code like this.


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