]> granicus.if.org Git - clang/commit
[CUDA] Improve target attribute checking for function templates.
authorArtem Belevich <tra@google.com>
Wed, 7 Dec 2016 19:27:16 +0000 (19:27 +0000)
committerArtem Belevich <tra@google.com>
Wed, 7 Dec 2016 19:27:16 +0000 (19:27 +0000)
commited1269004736ca3040a35ada53f3eaa7a10dc1c7
tree156d7f867a2722520a8510fab4a2f3682d584f06
parentac2fcb858ce82642df45888381118a0bf1d30c8d
[CUDA] Improve target attribute checking for function templates.

* __host__ __device__ functions are no longer considered to be
  redeclarations of __host__ or __device__ functions. This prevents
  unintentional merging of target attributes across them.
* Function target attributes are not considered (and must match) during
  explicit instantiation and specialization of function templates.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288962 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaCUDA.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
test/CodeGenCUDA/launch-bounds.cu
test/SemaCUDA/function-overload.cu
test/SemaCUDA/function-template-overload.cu [new file with mode: 0644]
test/SemaCUDA/target_attr_inheritance.cu [deleted file]