[OpenCL] Diagnose conflicting address spaces in templates.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 5 Dec 2018 17:02:22 +0000 (17:02 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 5 Dec 2018 17:02:22 +0000 (17:02 +0000)
commit12e3a8af81da5f55381a47fada6f76a63ca735ce
treef5f746686518c16a19617550fc097056c4c12f55
parent4ead99b3ac2a0ccd5174c35bcf339eb080dd9697
[OpenCL] Diagnose conflicting address spaces in templates.

Added new diagnostic when templates are instantiated with
different address space from the one provided in its definition.

This also prevents deducing generic address space in pointer
type of templates to allow giving them concrete address space
during instantiation.

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

llvm-svn: 348382
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaType.cpp
clang/lib/Sema/TreeTransform.h
clang/test/SemaOpenCLCXX/address-space-templates.cl