[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-14 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334700: [OpenCL] Support new/delete in Sema (authored by svenvh, committed by ). Repository: rC Clang https://reviews.llvm.org/D46651 Files: lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp lib

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D46651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-11 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM. Comment at: lib/Sema/SemaExprCXX.cpp:2030 + } +} svenvh wrote: > rjmccall wrote: > > Anastasia wrote: > > > svenvh wrote: > > > > rjmccall wrote: > > > > > I think a better interpretati

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:2030 + } +} rjmccall wrote: > Anastasia wrote: > > svenvh wrote: > > > rjmccall wrote: > > > > I think a better interpretation of this rule would be to just error on > > > > attempts t

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 150788. svenvh added a comment. Dropped 2 redundant uses of `getTypePtr()`; minor formatting changes. https://reviews.llvm.org/D46651 Files: lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaType.cpp test/SemaOpenCLCXX/newdelete.cl Inde

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:13010 + if (SemaRef.getLangOpts().OpenCLCPlusPlus) { +if (auto *PtrTy = ResultType.getTypePtr()->getAs()) { + ResultType = RemoveAddressSpaceFromPtr(SemaRef, PtrTy); `getTypePtr()` is

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 150535. svenvh retitled this revision from "[OpenCL] Support placement new/delete in Sema" to "[OpenCL] Support new/delete in Sema". svenvh edited the summary of this revision. svenvh added a comment. Relaxed the new/delete restrictions following the Khronos a