[cfe-dev] RefactoringCallbacks and RefactoringTool

Julian Bangert via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 31 15:52:45 PST 2017


Hello,

how to make RefactoringCallback and RefactoringTool play nicely together?
Each RefactoringCallback produces its own Replacements, but RefactoringTool
wants FrontendActions that populate the Replacements returned by
RefactoringTool::getReplacements().

I could write an adapter that does this (consume many callbacks, at the end
of each translation unit move from replacements and clear the old ones),
but that seems pretty inelegant. Do we care about API stability for
RefactoringCallback? It might be more elegant to change RefactoringCallback
to contain a reference to a map<string, Replacements> and add directly to
that.

Would you be willing to accept a patch that does this?

Regards,
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170131/1587671e/attachment.html>


More information about the cfe-dev mailing list