[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359798: [OpenCL] Fix initialisation of this via pointer. (authored by stulova, committed by ). Changed prior to commit: https://reviews.llvm.org/D61319?vs=197749=197800#toc Repository: rC Clang

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 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: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 197749. kpet added a comment. Clean up the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 Files: clang/lib/Sema/SemaOverload.cpp

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Most of these are pre-existing issues with the tests but I agree they're worth fixing. I'll update the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCLCXX/addrspace-of-this.cl:94 // Test the address space of 'this' when invoking a method that is declared in the file contex. -// COMMON: %call1 = call i32 @_ZNU3AS41C7outsideEv(%class.C addrspace(4)* addrspacecast

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 197617. kpet added a comment. Replaced the AST dump test with an IR test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 Files: lib/Sema/SemaOverload.cpp

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Ok, I'll replace the test with an IR-level test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would suggest an IR test, especially since what you want to achieve is addrspacecast in IR output. We use AST dump only if there is no other good way to test something. In fact we already have a test with similar logic that tests various OpenCL address spaces:

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-04-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added reviewers: Anastasia, mikael. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. When the expression used to initialise this has a pointer type, check the address space of the pointee type instead of the pointer type to decide