sfantao added a comment.
Hi Alexey,
Thanks for the review!
================
Comment at: include/clang/AST/Stmt.h:2018-2020
@@ -2016,2 +2017,5 @@
break;
+ case VCK_ByCopy:
+ assert(Var && "capturing by copy must have a variable!");
+ break;
case VCK_VLAType:
----------------
ABataev wrote:
> Also add assertion that only pointers anmd scalars are allowed to be captured
> by value
Done! Note however that VarDecl was an incomplete type here. So I moved the
code to Stmt.cpp.
================
Comment at: lib/Sema/SemaOpenMP.cpp:818-819
@@ +817,4 @@
+ // captures in that those cases.
+ IsByRef = isa<TemplateTypeParmType>(Ty) || isa<RecordType>(Ty) ||
+ isa<ArrayType>(Ty);
+ }
----------------
ABataev wrote:
> Wow. I think it is just enough to check !Ty->isScalarType().
Oh, right. Changed that to use `isScalarType`.
http://reviews.llvm.org/D14940
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits