[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 14:34:04 PDT 2019


ABataev added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:1419
+                               RecordDecl *RD, CapturedRegionKind K,
+                               unsigned CaptureLevel);
 
----------------
Better to use `OpenMPCaptureLevel` since this param is OpenMP specific.


================
Comment at: clang/include/clang/Sema/Sema.h:1419
+                               RecordDecl *RD, CapturedRegionKind K,
+                               unsigned CaptureLevel);
 
----------------
ABataev wrote:
> Better to use `OpenMPCaptureLevel` since this param is OpenMP specific.
Add default value for the parameter here too.


================
Comment at: clang/include/clang/Sema/Sema.h:3977
+                                ArrayRef<CapturedParamNameType> Params,
+                                unsigned CaptureLevel = 0);
   StmtResult ActOnCapturedRegionEnd(Stmt *S);
----------------
Same, add prefix `OpenMP`


================
Comment at: clang/include/clang/Sema/Sema.h:9027
+  bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
+                             unsigned CaptureLevel) const;
 
----------------
Same, `OpenMPCaptureLevel` here and in other places.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:17748
       ObjCAvailabilityCheckExpr(Version, AtLoc, RParen, Context.BoolTy);
-}
\ No newline at end of file
+}
----------------
Restore original code here


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:1350
         if (!SemaRef.isOpenMPCapturedByRef(
-                D, std::distance(ParentIterTarget, End))) {
+                D, std::distance(ParentIterTarget, End), /*CaptureLevel*/ 0)) {
           DVar.RefExpr =
----------------
Use `/*param=*/` format, please.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2973
     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
-                             Params);
+                             Params, /*CaptureLevel*/ 0);
     // Mark this captured region as inlined, because we don't use outlined
----------------
Same for param comment here and other places.


================
Comment at: clang/lib/Sema/SemaStmt.cpp:4324
   // Enter the capturing scope for this captured region.
-  PushCapturedRegionScope(CurScope, CD, RD, Kind);
+  PushCapturedRegionScope(CurScope, CD, RD, Kind, /*CaptureLevel*/ 0);
 
----------------
Use default value of the parameter, no need to pass 0 here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65835





More information about the cfe-commits mailing list