This is an archive of the discontinued LLVM Phabricator instance.

[refactor] Simplify the interface and remove some template magic
ClosedPublic

Authored by arphaman on Sep 11 2017, 5:53 AM.

Details

Summary

This patch tries to simplify the interface for the refactoring action rules and refactoring requirements. It merges the selection constraints and selection requirements into one class. The refactoring actions rules must now be implemented using subclassing instead of raw function / lambda pointers. This allowed me to get rid of a bunch of traits templates and other template checks.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman created this revision.Sep 11 2017, 5:53 AM
ioeric edited edge metadata.Sep 13 2017, 1:57 PM

This is very nice! Thanks!

Looks good to me; I'll let Manuel stamp the patch for you.

include/clang/Tooling/Refactoring/RefactoringActionRules.h
56 ↗(On Diff #114578)

Can this be private?

77 ↗(On Diff #114578)

private?

arphaman updated this revision to Diff 115211.Sep 14 2017, 6:30 AM
arphaman marked 2 inline comments as done.

Make methods private

ioeric accepted this revision.Sep 25 2017, 10:52 PM

@klimek Have you got a chance to take a look?

This revision is now accepted and ready to land.Sep 25 2017, 10:52 PM

I will commit this today. @klimek, let me know if there any issues in post-commit review.

This revision was automatically updated to reflect the committed changes.
cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp