[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366063: [OpenCL] Deduce addr space for pointee of dependent types in instantiation. (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pri

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Okay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 ___ cfe-commits mailing list cfe-comm

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D64400#1582142 , @rjmccall wrote: > There are some code paths that I think are common between the parser and > template instantiation, like `BuildPointerType` and `BuildReferenceType`, but > if you want to do context-sensiti

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. There are some code paths that I think are common between the parser and template instantiation, like `BuildPointerType` and `BuildReferenceType`, but if you want to do context-sensitive inference that might not be good enough. CHANGES SINCE LAST ACTION https://revi

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:7421 + // - template specialization as addr space in template argument doesn't + // affect specialization. + (T->isDependentType() && (!T->isPointerType

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 209205. Anastasia added a comment. - Moved addr space inference of pointee type into template instantiation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 Files: lib/Sema/TreeTransform.h test/SemaOpe

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaType.cpp:7421 + // - template specialization as addr space in template argument doesn't + // affect specialization. + (T->isDependentType() && (!T->isPointerType() && !T->isReferenceType() && --

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done and 2 inline comments as done. Anastasia added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} rjmccall wrote: > This is a suga

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 208993. Anastasia marked 2 inline comments as done. Anastasia added a comment. - Added handling of similar test case with `InjectedClassNameType` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 Files: in

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} This is a sugar type. What are you trying to do? Comment at: lib/Sema/SemaType.cpp:7417

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, mantognini. Herald added subscribers: ebevhan, yaxunl. Addr space of a template arg doesn't affect the `QualType` of template specialization. Therefore addr space of a template specialization can be deduced during parsing of