[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 13:11:17 PST 2017


NoQ added a comment.

In https://reviews.llvm.org/D40809#945551, @NoQ wrote:

> If you want to turn this into a form of user-facing analyzer output variant, you may want to implement it as a `PathDiagnosticConsumer` rather than a visitor.


Or maybe no, actually it's totally wrong, never mind. `PathDiagnosticConsumer` only operates on diagnostics, and it no longer knows anything about nodes, so the info is lost by that time. We could probably still go this way by making a visitor emit special per-line path diagnostics that are all ignored by all consumers except yours. This may actually be the best way to go, but such patch would be very intrusive because there are many switches by diagnostic kinds all over the place and they all would need to be updated.


https://reviews.llvm.org/D40809





More information about the cfe-commits mailing list