[CUDA] Do not merge CUDA target attributes.
authorArtem Belevich <tra@google.com>
Tue, 13 Sep 2016 22:16:30 +0000 (22:16 +0000)
committerArtem Belevich <tra@google.com>
Tue, 13 Sep 2016 22:16:30 +0000 (22:16 +0000)
commitbed18e9cc4ce31a9931ea83ec7c071ecc0eee8ec
treedb4b1fd52e1fb3ab5a867eec02f1a3a47e151d4d
parent255abad9b1264da0ee2399012d073c424a31b2f9
[CUDA] Do not merge CUDA target attributes.

CUDA target attributes are used for function overloading and must not be merged.

This fixes a bug where attributes were inherited during function template
specialization in CUDA and made it impossible for specialized function
to provide its own target attributes.

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

llvm-svn: 281406
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCUDA/function-overload.cu
clang/test/SemaCUDA/target_attr_inheritance.cu [new file with mode: 0644]