[all-commits] [llvm/llvm-project] 4fc752: [CUDA][HIP] Always defer diagnostics for wrong-sid...

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Fri Jul 17 04:52:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fc752b30b9acac73a282cb844a6240e6cb70cca
      https://github.com/llvm/llvm-project/commit/4fc752b30b9acac73a282cb844a6240e6cb70cca
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M clang/lib/Sema/SemaCUDA.cpp
    M clang/test/SemaCUDA/builtins.cu
    M clang/test/SemaCUDA/call-kernel-from-kernel.cu
    M clang/test/SemaCUDA/function-overload.cu
    M clang/test/SemaCUDA/function-target.cu
    M clang/test/SemaCUDA/implicit-device-lambda.cu
    M clang/test/SemaCUDA/method-target.cu
    M clang/test/SemaCUDA/reference-to-kernel-fn.cu

  Log Message:
  -----------
  [CUDA][HIP] Always defer diagnostics for wrong-sided reference

When a device function calls a host function or vice versa, this is wrong-sided
reference. Currently clang immediately diagnose it. This is different from nvcc
behavior, where it is diagnosed only if the function is really emitted.

Current clang behavior causes false alarms for valid use cases.

This patch let clang always defer diagnostics for wrong-sided
reference.

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




More information about the All-commits mailing list