<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 1, 2014 at 12:55 PM, Etienne Ollivier <span dir="ltr"><<a href="mailto:eollivier@bsu.edu" target="_blank">eollivier@bsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
I updated my clang repository recently and I an error appeared that was not<br>
there before:<br>
<br>
error: no viable conversion from 'std::unique_ptr<FrontendActionFactory>' to<br>
'clang::tooling::ToolAction *'<br>
return Tool.run(newFrontendActionFactory<MyPluginASTAction>());<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<br>
It is because newFrontendActionFactory has been changed to work with<br>
std::unique_ptr. So if I change my code to<br>
return Tool.run(&(*newFrontendActionFactory<MyPluginASTAction>()));<br>
<br>
it works. The only little problem is that it can be confusing for users<br>
since is not the way it is written in the documentation, like on this pages:<br>
<a href="http://clang.llvm.org/docs/LibTooling.html" target="_blank">http://clang.llvm.org/docs/LibTooling.html</a><br>
<a href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html" target="_blank">http://clang.llvm.org/docs/LibASTMatchersTutorial.html</a></blockquote><div><br></div><div>Hi Etienne,</div><div><br></div><div>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?</div>
<div><br></div><div>Eli </div></div></div></div>