[PATCH] D84364: [CUDA][HIP] Defer all diagnostics for host device functions
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 22 19:10:48 PDT 2020
jdoerfert added a comment.
In D84364#2168036 <https://reviews.llvm.org/D84364#2168036>, @tra wrote:
> E.g.
>
> __host__ __device__ static void hd() {
> no_such_type_t t;
> }
>
>
> We obviously can never compile this function on either side of the compilation and clang currently does diagnose it on both sides.
> However, if all diagnostics in HD functions are postponed until codegen, this error will go unreported.
I am not certain but I could imagine a scenario in which problematic code would trigger visible changes to the program behavior w/o an error ever being emitted. That seems really undesirable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84364/new/
https://reviews.llvm.org/D84364
More information about the cfe-commits
mailing list