[cfe-dev] Problem with a change on newFrontendActionFactory

Etienne Ollivier eollivier at bsu.edu
Thu May 1 12:55:49 PDT 2014


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

Regards,
Etienne



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Problem-with-a-change-on-newFrontendActionFactory-tp4039225.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list