Page MenuHomePhabricator

[analyzer] MisusedMovedObjectChecker: Add a printState() method.

Authored by NoQ on Mar 31 2017, 9:16 AM.



The printState() method adds the checker's information to the State->dump(). I find it very handy when debugging by looking at the exploded graphs, so i think it's great to have this method implemented in all checkers. It helped me already.

I think it's not a problem if the graphs become too large when all checkers print their state, because since you're always only debugging a few checkers, you can easily disable the rest of them.

Diff Detail


Event Timeline

NoQ created this revision.Mar 31 2017, 9:16 AM
szepet accepted this revision.Mar 31 2017, 10:54 AM

LGTM, thank you (again)!

This revision is now accepted and ready to land.Mar 31 2017, 10:54 AM
NoQ added a comment.Apr 13 2017, 4:17 AM

Hmm, i've been thinking of writing a test for this via ExprInspection's clang_analyzer_printState(), however printState() functionality is only enabled in debug builds, and i'm not seeing how to enable the test only on debug builds (there's REQUIRES: but it only seems to have an asserts flag).

xazax.hun accepted this revision.Oct 9 2017, 6:13 AM


This revision was automatically updated to reflect the committed changes.