[CUDA][HIP] Fix hostness of defaulted constructor
authorYaxun Liu <Yaxun.Liu@amd.com>
Fri, 20 Sep 2019 14:28:09 +0000 (14:28 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Fri, 20 Sep 2019 14:28:09 +0000 (14:28 +0000)
commite5d17c511fa603b557f86257b5b6f39b429f4e35
treeab5b5e890b32f0e0440fb789d1960ab57fcf997f
parent4896f7243d629dfa9cce4acf2f72ca1e081a2c40
[CUDA][HIP] Fix hostness of defaulted constructor
Clang does not respect the explicit device host attributes of defaulted special members.
Also clang does not respect the hostness of special members determined by their
first declarations.
Clang also adds duplicate implicit device or host attributes in certain cases.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D67509

llvm-svn: 372394
clang/lib/Sema/SemaCUDA.cpp
clang/test/SemaCUDA/default-ctor.cu [new file with mode: 0644]