[OpenCL] Improve diags for addr spaces in templates
authorAnastasia Stulova <anastasia.stulova@arm.com>
Thu, 29 Nov 2018 14:11:15 +0000 (14:11 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Thu, 29 Nov 2018 14:11:15 +0000 (14:11 +0000)
commit6a4c34689e2ff1ac4f65b9d0cb9136382e55046d
treee16e5b62f56a2a12730230c0b431e673ff2cd933
parent6e3be9d12e29c951df076df7f1891473de34ff8b
[OpenCL] Improve diags for addr spaces in templates

Fix ICEs on template instantiations that were leading to
the creation of invalid code patterns with address spaces.

Incorrect cases are now diagnosed properly.

Differential Revision: https://reviews.llvm.org/D54858

llvm-svn: 347865
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/Sema/TreeTransform.h
clang/test/CodeGenOpenCLCXX/template-address-spaces.cl
clang/test/SemaOpenCLCXX/address-space-templates.cl [new file with mode: 0644]