<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 3, 2014 at 2:26 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><p dir="ltr"><br>
On 2 Jan 2014 20:06, "Manuel Klimek" <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
><br>
><br>
>   lg.<br>
><br>
><br>
> ================<br>
> Comment at: clang-tidy/ClangTidy.h:107-109<br>
> @@ +106,5 @@<br>
> +///<br>
> +/// FIXME: Ideally we'd want to build a more generic way to use<br>
> +/// \c FrontendAction based checkers in clang-tidy, but that needs some<br>
> +/// preparation work first.<br>
> +class ClangTidyAction : public ASTFrontendAction {<br>
> ----------------<br>
> Alexander Kornienko wrote:<br>
> > Manuel Klimek wrote:<br>
> > > Why?<br>
> > I'm not sure what exactly did you mean when writing this, and I was thinking already about asking you, if this comment is still applicable.<br>
> Yea, I don't understand my own fixme any more... Probably we should delete it :)<br>
><br>
> ================<br>
> Comment at: clang-tidy/ClangTidy.h:110<br>
> @@ +109,3 @@<br>
> +  /// \brief Returns an action that runs the specified clang-tidy checks.<br>
> +  virtual FrontendAction *create() LLVM_OVERRIDE;<br>
> +<br>
> ----------------<br>
> Cool. One question is whether it's worth having this small function (with the trivial class) in here at all. Do we expect this to be called outside of clang-tidy itself?</p>
</div></div><p dir="ltr">It's already called somewhere in tooling via the FrontendActionFactory interface. What would be a better alternative to this?</p></blockquote><div><br></div><div>Oh, this is now a FrontendActionFactory? I thought we'd wanted to get an interface that is free of FrontendAction* stuff.</div>
<div><br></div><div>To me, we have conceptually two parts in clang-tidy:</div><div>1. a library interface that provides an ASTConsumer and PPCallbacks to be used by other clang-based analysis pipelines</div><div>2. something to run clang-tidy over a bunch of code</div>
<div><br></div><div>Conceptually, the first one should be as far as I understand completely independent of anything related to FrontendAction. The second part then creates a FrontendAction that just runs clang-tidy's ASTConsumer and PPCallbacks </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<p dir="ltr">><br>
><br>
> <a href="http://llvm-reviews.chandlerc.com/D2481" target="_blank">http://llvm-reviews.chandlerc.com/D2481</a><br>
><br>
> BRANCH<br>
>   svn<br>
><br>
> ARCANIST PROJECT<br>
>   clang-tools-extra<br>
</p>
</div></div></blockquote></div><br></div></div>