[PATCH] D100055: Fix missing generate capture expression for novariants's condition

2021-04-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision.
jyu2 added a comment.

committed rGebf2dc33287e 
: Fix 
missing generate capture expression for novariants condition. (authored by 
jyu2).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100055

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D100055: Fix missing generate capture expression for novariants's condition

2021-04-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.

LG


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100055

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D100055: Fix missing generate capture expression for novariants's condition

2021-04-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision.
jyu2 added reviewers: ABataev, mikerice.
jyu2 requested review of this revision.
Herald added a project: clang.

This is fix missing capture expression for novariants's condition


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100055

Files:
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/dispatch_ast_print.cpp


Index: clang/test/OpenMP/dispatch_ast_print.cpp
===
--- clang/test/OpenMP/dispatch_ast_print.cpp
+++ clang/test/OpenMP/dispatch_ast_print.cpp
@@ -56,6 +56,9 @@
   //DUMP: OMPDependClause
   //DUMP: OMPNowaitClause
   //DUMP: OMPNovariantsClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
+  //DUMP: OMPNocontextClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
   #pragma omp dispatch depend(in:var) nowait novariants(aaa > 5) nocontext(bbb 
> 5)
   foo(aaa, );
 
@@ -66,6 +69,9 @@
   //DUMP: OMPDeviceClause
   //DUMP: OMPIs_device_ptrClause
   //DUMP: OMPNovariantsClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
+  //DUMP: OMPNocontextClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
   #pragma omp dispatch device(dev) is_device_ptr(dp) novariants(dev > 10) 
nocontext(dev > 5)
   foo(aaa, dp);
 
Index: clang/lib/Sema/SemaOpenMP.cpp
===
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -14905,6 +14905,7 @@
 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
   ValExpr = MakeFullExpr(ValExpr).get();
   llvm::MapVector Captures;
+  ValExpr = tryBuildCapture(*this, ValExpr, Captures).get();
   HelperValStmt = buildPreInits(Context, Captures);
 }
   }


Index: clang/test/OpenMP/dispatch_ast_print.cpp
===
--- clang/test/OpenMP/dispatch_ast_print.cpp
+++ clang/test/OpenMP/dispatch_ast_print.cpp
@@ -56,6 +56,9 @@
   //DUMP: OMPDependClause
   //DUMP: OMPNowaitClause
   //DUMP: OMPNovariantsClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
+  //DUMP: OMPNocontextClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
   #pragma omp dispatch depend(in:var) nowait novariants(aaa > 5) nocontext(bbb > 5)
   foo(aaa, );
 
@@ -66,6 +69,9 @@
   //DUMP: OMPDeviceClause
   //DUMP: OMPIs_device_ptrClause
   //DUMP: OMPNovariantsClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
+  //DUMP: OMPNocontextClause
+  //DUMP: DeclRefExpr {{.*}} 'bool' lvalue OMPCapturedExpr
   #pragma omp dispatch device(dev) is_device_ptr(dp) novariants(dev > 10) nocontext(dev > 5)
   foo(aaa, dp);
 
Index: clang/lib/Sema/SemaOpenMP.cpp
===
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -14905,6 +14905,7 @@
 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
   ValExpr = MakeFullExpr(ValExpr).get();
   llvm::MapVector Captures;
+  ValExpr = tryBuildCapture(*this, ValExpr, Captures).get();
   HelperValStmt = buildPreInits(Context, Captures);
 }
   }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits