When template instantiation leads to creation of invalid code patterns with address spaces compiler crashes with ICE.
This patch fixes the template instantiation to provide correct diagnostics instead.
Paths
| Differential D54858
[OpenCL] Improve diagnostics for address spaces in template instantiation ClosedPublic Authored by Anastasia on Nov 23 2018, 6:07 AM.
Details Summary When template instantiation leads to creation of invalid code patterns with address spaces compiler crashes with ICE. This patch fixes the template instantiation to provide correct diagnostics instead.
Diff Detail Event Timeline
Anastasia added inline comments.
Comment Actions
Anastasia added inline comments. This revision is now accepted and ready to land.Nov 28 2018, 8:38 AM Closed by commit rL347865: [OpenCL] Improve diags for addr spaces in templates (authored by stulova). · Explain WhyNov 29 2018, 6:14 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 175699 lib/Sema/SemaDecl.cpp
lib/Sema/SemaType.cpp
lib/Sema/TreeTransform.h
test/CodeGenOpenCLCXX/template-address-spaces.cl
test/SemaOpenCLCXX/address-space-templates.cl
|
When do you actually add the qualifier back?
Also, I don't think this is specific to either OpenCL or direct references to template type parameters; it has to be any dependent type.