[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 14:48:16 PDT 2024


Bigcheese wrote:

> Could we simplify this even further by removing `DiagnosticConsumer::finish()` entirely, moving the code in `SDiagsWriter::finish()` to `SDiagsWriter::~SDiagsWriter()` and ensuring the **destructor** gets called even with `-disable-free`?

This is doable, but I'm not sure it's better. It's a bit weird to be required to destroy a single member of a member of `CompilerInstance`, but not anything else.

> Also, can you please create and link a downstream PR that adds a test case?

Sure, it's just invoking the libclang dependency scanning API with an invalid driver command line.

https://github.com/llvm/llvm-project/pull/100681


More information about the cfe-commits mailing list