[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-17 Thread Anton Zabaznov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe1a64aa66c33: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode (authored by azabaznov). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-16 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added a comment. Thanks for review. Last change is a small fix for if clang-tidy warnings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 ___ cfe-commit

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-16 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov updated this revision to Diff 324004. azabaznov added a comment. Fix clang-tidy warnings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 Files: clang/lib/AST/ASTContext.cpp clang/lib/Sema/Sema

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI I have created `PR49191` for the issues with address spaces I have highlighted earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 __

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-15 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 __

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-12 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov marked an inline comment as done. azabaznov added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:15289 +ExpectedResultType->getAs()) { + ExpectedResultType = SemaRef.Context.getCanonicalType( + RemoveAddressSpaceFromPtr(SemaRef, Ex

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-12 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov updated this revision to Diff 323421. azabaznov added a comment. Rewrote 'RemoveAddressSpaceFromPtr' to return canonical type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 Files: clang/lib/AST

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. PS, I will create a PR to follow up on the issue I have discovered. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 ___ cfe-commits mai

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Do I understand correctly that this means void pointer is not necessarily > points to generic AS? This is an internal Clang pointer type that is used in very few places as a pointer to anything, so it makes sense to add generic. I agree this change actually fixes a

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-10 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D96178#2551449 , @Anastasia wrote: > @svenvh We haven't looked into address spaces in details when adding this. I > wonder what behavior would make sense for new/delete? Do we plan to allow > new/delete in named address spaces

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-10 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added a comment. Thanks for review. Just to be clear: can I proceed with this? Or we should discuss it first? As I see possible this change can be abandoned after discussion. Moreover,  I see nothing about address space of void pointer in OpenCL C spec. For example (OpenCL C 2.2, Cla

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @svenvh We haven't looked into address spaces in details when adding this. I wonder what behavior would make sense for new/delete? Do we plan to allow new/delete in named address spaces or only in generic? It might be more helpful to allow named address spaces since g

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-05 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov created this revision. azabaznov added reviewers: svenvh, Anastasia. Herald added a subscriber: yaxunl. azabaznov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change affects 'SemaOpenCLCXX/newdelete.cl' test, thus the patc