[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-13 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6050c156ab4f: [OpenCL] Defer addr space deduction for dependent type. (authored by Anastasia). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82781/new/ http

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-08 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82781/new/ https://reviews.llvm.org/D82781 ___ cfe-commits mailing lis

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-08 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 276369. olestrohm marked an inline comment as done. olestrohm added a comment. I've removed the comments calling for a fix because I no longer feel that this approach needs that. Given the code that already exists, and without changing too much of it, addi

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3628 + // FIXME: This may not be the best approach, as the correct type (including + // address space) is available in D, but the type in D may not be reliable Is this

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-03 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 275381. olestrohm added a comment. I have added a check in `deduceOpenCLAddressSpace()` to check if the type is dependent, and not deduce the address space if it is. This is a big change in the behaviour of address space deduction, meaning that template va

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-03 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 275351. olestrohm added a comment. Disregard the last comment, rolling back that diff for now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82781/new/ https://reviews.llvm.org/D82781 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clan

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-03 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 275345. olestrohm added a comment. Added a guard in deduceOpenCLAddressSpace to stop it from deducing address space for dependent types, as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82781/new/ https://reviews.llvm.org/D82781 Files

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-07-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Seems like you shouldn't do it earlier if the type is dependent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82781/new/ https://reviews.llvm.org/D82781 ___ cfe-commits maili

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-06-30 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm added a comment. Essentially, in each pass the type for the variable starts off being extract from the SourceTypeInfo, but since the address space isn't specified, this type is then missing an address space. Adding the address space deduction then reintroduces the address space to the

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-06-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. So if I understand this correctly when the template is instantiated we don't have `QualType` with the address space deduced initially during parsing of a template global variable? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D82781: [OpenCL] Fix missing address space deduction in template variables

2020-06-29 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm created this revision. olestrohm added reviewers: Anastasia, rjmccall. olestrohm added a project: clang. Herald added a subscriber: yaxunl. This patch fixes two instances of not deducing address spaces for global template variables. I've added OpenCL address space deduction to the funct