jansvoboda11 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.
Ok, that's a fair point. Let's keep it as is then. > > 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. Thanks. I'm happy to approve this PR once we have the test. https://github.com/llvm/llvm-project/pull/100681 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits