[PATCH] D84364: [CUDA][HIP] Defer all diagnostics for host device functions

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 22 20:46:10 PDT 2020


yaxunl added a comment.

I'd like to clarify a little bit about `deferring` an error.

First it is localized to a function. If an error causes a function not parsed completely, it will be emitted immediately.

So if an error is deferred, it means clang at least parses that function containing it.

Second, if an entity caused an error which is `deferred`, it does not mean clang thinks `gee, let's defer it, and thinks now we do not have error here`. It is more like `OK here is an error and we know it. We just save that message somewhere and do not print it out for now.` clang knows that error happened and propagates the error status the same way as non-deferred diagnostics inside that function. In a sense, the deferred diagnostic and immediate diagnostic does not differ much.


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

https://reviews.llvm.org/D84364





More information about the cfe-commits mailing list