[CUDA][HIP] Enable kernel function return type deduction.
authorMichael Liao <michael.hliao@gmail.com>
Wed, 25 Sep 2019 16:51:45 +0000 (16:51 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 25 Sep 2019 16:51:45 +0000 (16:51 +0000)
commit24337db616668125b55781a82d7651800934ae4a
tree0c00504ba1b16f1cd4084e1c4965463532936424
parent8535a8672e16a553f83eb2c21b1f9823d9293117
[CUDA][HIP] Enable kernel function return type deduction.

Summary:
- Even though only `void` is still accepted as the deduced return type,
  enabling deduction/instantiation on the return type allows more
  consistent coding.

Reviewers: tra, jlebar

Subscribers: cfe-commits, yaxunl

Tags: #clang

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

llvm-svn: 372898
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/SemaCUDA/autoret-global.cu [new file with mode: 0644]