ABataev added inline comments.
================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:16393-16416 +static DefaultMapImplicitBehavior +getImplicitBehaviorFromModifier(OpenMPDefaultmapClauseModifier M) { + switch (M) { + case OMPC_DEFAULTMAP_MODIFIER_alloc: + return DMIB_alloc; + case OMPC_DEFAULTMAP_MODIFIER_to: + return DMIB_to; ---------------- ABataev wrote: > Do we need types `DefaultMapImplicitBehavior` and > `DefaultMapVariableCategory` if the map 1 to 1 to > `OpenMPDefaultmapClauseModifier` and `OpenMPDefaultmapClauseKind`? What about this? ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:1901-1904 + (Ty->isScalarType() && !Ty->isPointerType() && + DSAStack->isDefaultmapCapturedByRef(Level, DMVC_scalar)) || + (Ty->isPointerType() && + DSAStack->isDefaultmapCapturedByRef(Level, DMVC_pointer)) || ---------------- Just `DSAStack->isDefaultmapCapturedByRef(Level, getVariableCategoryFromDecl(D))` ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:2121-2125 + if ((D->getType()->isScalarType() && !D->getType()->isPointerType() && + DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_scalar)) || + (D->getType()->isPointerType() && + DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_pointer)) || + DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_aggregate)) ---------------- Just `DSAStack->mustBeFirstprivateAtLevel(NewLevel, getVariableCategoryFromDecl(D))` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69204/new/ https://reviews.llvm.org/D69204 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits