[cfe-dev] Problem with a change on newFrontendActionFactory

Eli Bendersky eliben at google.com
Thu May 1 13:08:52 PDT 2014


On Thu, May 1, 2014 at 12:55 PM, Etienne Ollivier <eollivier at bsu.edu> wrote:

> Hello,
> I updated my clang repository recently and I an error appeared that was not
> there before:
>
> error: no viable conversion from 'std::unique_ptr<FrontendActionFactory>'
> to
>       'clang::tooling::ToolAction *'
>         return Tool.run(newFrontendActionFactory<MyPluginASTAction>());
>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> It is because newFrontendActionFactory has been changed to work with
> std::unique_ptr. So if I change my code to
>    return Tool.run(&(*newFrontendActionFactory<MyPluginASTAction>()));
>
> it works. The only little problem is that it can be confusing for users
> since is not the way it is written in the documentation, like on this
> pages:
> http://clang.llvm.org/docs/LibTooling.html
> http://clang.llvm.org/docs/LibASTMatchersTutorial.html


Hi Etienne,

You're right - this change was made very recently and the documentation has
not been updated yet. Would you like to contribute a documentation patch to
fix this?

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140501/396a45cb/attachment.html>


More information about the cfe-dev mailing list