ABataev 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()) {
----------------
cchen wrote:
> 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.
Better to use a new counter var here for ClauseKind
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69204/new/
https://reviews.llvm.org/D69204
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits