yaxunl added a comment.

In D101793#2772461 <https://reviews.llvm.org/D101793#2772461>, @weiwang wrote:

> Thanks for the approval!
>
> Just want to understand the list of "decls to check for deferred diagnostics" 
> better, where are these decls coming from? And why do they need to be checked 
> for warnings? I see decls from libc are in the list, but I have no idea why 
> are they selected.

For offloading languages e.g. OpenMP/CUDA/HIP, there are apparent errors in 
functions shared between host and device. However, unless these functions are 
sure to be emitted on device or host, these errors should not be emitted. These 
errors are so called deferred error messages. The function decls which need to 
be checked are recorded. After AST is finalized, the AST of these functions are 
iterated. If a function is found sure to be emitted, the deferred error message 
in it are emitted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101793/new/

https://reviews.llvm.org/D101793

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to