Page MenuHomePhabricator

[clang-move] Enable dump all declarations in old header.

Authored by hokein on Nov 23 2016, 9:58 AM.


  • Add -dump_dels option to dump all declarations from old header. It will allow clang-move used as a frontend to get declarations from header. Further more, this will make debugging stuff easier.Currently only support dumpng class/function types.
  • Refactoring code a little bit by creating a ClangMoveContext which holds all options for ClangMoveTool, which can simplify the code in some degree.

Diff Detail


Event Timeline

hokein updated this revision to Diff 79119.Nov 23 2016, 9:58 AM
hokein updated this revision to Diff 79120.
hokein retitled this revision from to [clang-move] Enable dump all declarations in old header..
hokein updated this object.
hokein added a reviewer: ioeric.
hokein added a subscriber: cfe-commits.

Code style.

ioeric added inline comments.Nov 23 2016, 10:58 PM
90 ↗(On Diff #79120)

Is this the right place for this comment? Seems a bit unexpected.

522 ↗(On Diff #79120)

What if Reporter.getDeclarationList().size() > ExpectedDeclaration.size().

I'd use iterator-based loop on both vectors and assert both iterators reached end after loop.

hokein updated this revision to Diff 79194.Nov 24 2016, 1:34 AM
hokein marked 2 inline comments as done.

Add comments && Update test.

ioeric edited edge metadata.Nov 24 2016, 1:48 AM

LG with a nit.

155 ↗(On Diff #79194)

This check is run in each iteration... maybe just loop from begin() to end()-1 and special casing the last element, in which case you don't need to check in each run.

ioeric accepted this revision.Nov 24 2016, 1:48 AM
ioeric edited edge metadata.
This revision is now accepted and ready to land.Nov 24 2016, 1:48 AM
This revision was automatically updated to reflect the committed changes.