<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 3, 2014 at 8:11 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div class="h5">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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><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></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>
</div></div></div></blockquote><div><br></div><div>Please take a look at the latest update. There's still no separation between ASTConsumer and PPCallbacks stuff (there's a FIXME in place), but it should now be closer to your proposed design.<br>
</div></div>
</div></div>