[OPENMP]Fix PR47158, case 2: do not report host-only functions in unused function...
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 18 Aug 2020 18:51:51 +0000 (14:51 -0400)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 19 Aug 2020 20:14:33 +0000 (16:14 -0400)
commitfb4acd37fe60a08a0077560d2814053d76ea1c41
tree97c24d25fb086e1a15271ff83fd633cb94bbc176
parent3fb3927bd333cded1f51025161a4ee7e7ca722c1
[OPENMP]Fix PR47158, case 2: do not report host-only functions in unused function in device mode.

If the function is not marked exlicitly as declare target and it calls
function(s), marked as declare target device_type(host), these host-only
functions should not be dignosed as used in device mode, if the caller
function is not used in device mode too.

Differential Revision: https://reviews.llvm.org/D86164
clang/lib/Sema/Sema.cpp
clang/test/OpenMP/declare_target_messages.cpp