[cfe-dev] Get Replacements to FrontendAction

Daniel Dilts via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 27 10:40:56 PDT 2015


I guess that I am doing something wrong.  This is my code:

  RefactoringTool tool(optionsParser.getCompilations(),
optionsParser.getSourcePathList());
 MyAction action{tool};
 auto a = tool.runAndSave(newFrontendActionFactory(&action).get());

I am getting an error 'newASTConsumer': is not a member of 'MyAction'.  It
seems to want some kind of action factory, not an action.

On Wed, Aug 26, 2015 at 9:19 PM, Manuel Klimek <klimek at google.com> wrote:

> You hand the refactoring tool pointer to the Frontend action factory,
> which then hands it to the Frontend action.
>
> On Wed, Aug 26, 2015, 6:29 PM Daniel Dilts via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> I have a custom FrontendAction that I want to run using
>> RefactoringTool::runAndSave().  runAndSave() takes a FrontendActionFactory
>> and doesn't appear to have a way to pass parameters to the produced action.
>>
>> How does one get the replacements list from
>> RefactoringTool::getReplacements() into their FrontendAction?
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150827/a03677f1/attachment.html>


More information about the cfe-dev mailing list