[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
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 5 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- include/clang/Sema/Sema.h 8 additions, 1 deletioninclude/clang/Sema/Sema.h
- lib/Sema/SemaCUDA.cpp 68 additions, 0 deletionslib/Sema/SemaCUDA.cpp
- lib/Sema/SemaDecl.cpp 3 additions, 0 deletionslib/Sema/SemaDecl.cpp
- lib/Sema/SemaOverload.cpp 12 additions, 10 deletionslib/Sema/SemaOverload.cpp
- lib/Sema/SemaTemplate.cpp 34 additions, 1 deletionlib/Sema/SemaTemplate.cpp
- test/CodeGenCUDA/launch-bounds.cu 3 additions, 3 deletionstest/CodeGenCUDA/launch-bounds.cu
- test/SemaCUDA/function-overload.cu 32 additions, 26 deletionstest/SemaCUDA/function-overload.cu
- test/SemaCUDA/function-template-overload.cu 82 additions, 0 deletionstest/SemaCUDA/function-template-overload.cu
- test/SemaCUDA/target_attr_inheritance.cu 0 additions, 29 deletionstest/SemaCUDA/target_attr_inheritance.cu
Loading
Please register or sign in to comment