llvm-project/clang/test/SemaCUDA
Artem Belevich 186091094a [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.
This is an artefact of split-mode CUDA compilation that we need to
mimic. HD functions are sometimes allowed to call H or D functions. Due
to split compilation mode device-side compilation will not see host-only
function and thus they will not be considered at all. For clang both H
and D variants will become function overloads visible to
compiler. Normally target attribute is considered only if C++ rules can
not determine which function is better. However in this case we need to
ignore functions that would not be present during current compilation
phase before we apply normal overload resolution rules.

Changes:
* introduced another level of call preference to better describe
  possible call combinations.
* removed WrongSide functions from consideration if the set contains
  SameSide function.
* disabled H->D, D->H and G->H calls. These combinations are
  not allowed by CUDA and we were reluctantly allowing them to work
  around device-side calls to math functions in std namespace.
  We no longer need it after r258880.

Differential Revision: http://reviews.llvm.org/D16870

llvm-svn: 260697
2016-02-12 18:29:18 +00:00
..
Inputs [CUDA] Report an error if code tries to mix incompatible CUDA attributes. 2016-01-13 01:07:35 +00:00
alias.cu [CUDA] Reject the alias attribute in CUDA device code. 2016-01-23 21:28:10 +00:00
amdgpu-num-gpr-attr.cu Workaround attribute ordering issue with kernel only attributes 2014-12-05 18:03:58 +00:00
asm-constraints-device.cu Ignore device-side asm constraint errors while compiling CUDA code for host and vice versa. 2015-03-19 18:40:25 +00:00
asm-constraints-mixed.cu Produce a better diagnostic for global register variables. 2015-11-18 00:15:28 +00:00
attributes-on-non-cuda.cu [CUDA] Report an error if code tries to mix incompatible CUDA attributes. 2016-01-13 01:07:35 +00:00
bad-attributes.cu [CUDA] Only allow __global__ on free functions and static member functions. 2016-01-20 00:26:57 +00:00
builtins.cu [CUDA] Allow parsing of host and device code simultaneously. 2015-09-22 17:23:22 +00:00
config-type.cu
cuda-builtin-vars.cu [cuda] Added support for CUDA built-in variables. 2015-04-21 22:14:13 +00:00
cxx11-kernel-call.cu [CUDA] Warn undeclared identifiers in CUDA kernel calls 2016-01-14 23:31:30 +00:00
function-overload.cu [CUDA] Tweak attribute-based overload resolution to match nvcc behavior. 2016-02-12 18:29:18 +00:00
function-target-disabled-check.cu Create a frontend flag to disable CUDA cross-target call checks 2015-04-15 22:27:06 +00:00
function-target-hd.cu [CUDA] use -aux-triple to pass target triple of opposite side of compilation 2015-11-17 22:28:40 +00:00
function-target.cu CUDA: Add option to allow host device functions to call host functions 2015-02-24 21:45:33 +00:00
implicit-copy.cu Consider calls from implict host device functions as valid in SemaCUDA. 2014-12-16 20:12:38 +00:00
implicit-intrinsic.cu [CUDA] Add appropriate host/device attribute to builtins. 2015-09-22 17:23:05 +00:00
implicit-member-target-collision-cxx11.cu CUDA: Fix incorrect target inference for implicit members. 2014-09-29 20:38:29 +00:00
implicit-member-target-collision.cu CUDA: Fix incorrect target inference for implicit members. 2014-09-29 20:38:29 +00:00
implicit-member-target.cu Consider calls from implict host device functions as valid in SemaCUDA. 2014-12-16 20:12:38 +00:00
kernel-call.cu [CUDA] Warn undeclared identifiers in CUDA kernel calls 2016-01-14 23:31:30 +00:00
launch_bounds.cu [cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments. 2015-04-21 22:55:54 +00:00
lit.local.cfg
method-target.cu Fix PR20886 - enforce CUDA target match in method calls 2014-09-25 23:59:08 +00:00
qualifiers.cu [cuda] Preserve TLS storage class of host variable even if it's a 2015-04-28 20:31:49 +00:00
vararg.cu [CUDA] Add -fcuda-allow-variadic-functions. 2016-01-26 17:47:20 +00:00