<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 23, 2017, at 1:40 AM, Gábor Horváth <<a href="mailto:xazax.hun@gmail.com" class="">xazax.hun@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">Anna,<br class=""><br class=""></div>Are you ok having libTooling as a dependency of the Static Analyzer? </div></div></div></div></blockquote><div><br class=""></div><div>Are we talking about introducing dependency for scan-build or clang itself?</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">I think this is not a bad direction since it has other good utilities that the Static Analyzer could use in the future such as Replacements, FixIts. <br class=""><br class=""></div>Regards,<br class=""></div>Gábor<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 22 June 2017 at 12:10, Manuel Klimek <span dir="ltr" class=""><<a href="mailto:klimek@google.com" target="_blank" class="">klimek@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">For clang tooling, I don't really expect us to do cross-TU AST loading outside of what modules will provide, as that inherently doesn't scale. Instead, we usually design pipelined approaches where the first "scan" over the codebase provides data which are reduced to the information needed for the tool.<div class=""><br class=""><div class=""><div class="">That said, I can't predict the future, and people have expressed interest in that functionality, so</div></div></div><div class="">a) I agree it's a good idea to add and </div><div class="">b) I think it's a good fit for libtooling</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">/Manuel</div><div class=""><br class=""></div></div><div class="HOEnZb"><div class="h5"><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Jun 22, 2017 at 11:58 AM Aleksei Sidorin <<a href="mailto:a.sidorin@samsung.com" target="_blank" class="">a.sidorin@samsung.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Gabor,<br class="">
<br class="">
Internally, we have created XTU module inside clang (lib/XTU). I think<br class="">
it is the best way because importing is not related to analyzer<br class="">
directly. We're not going to use it outside of CSA but I think future<br class="">
users should have such possibility.<br class="">
<br class="">
22.06.2017 12:41, Gábor Horváth пишет:<br class="">
> Hi!<br class="">
><br class="">
> It looks like there is a consensus to accept the cross translation<br class="">
> unit analysis patch into the clang static analyzer:<br class="">
> <a href="https://reviews.llvm.org/D30691" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/<wbr class="">D30691</a><br class="">
><br class="">
> There is one part of the patch that is independent of the static<br class="">
> analyzer. The logic which can look up a function in an index and load<br class="">
> a serialized AST that contains the definition of the function.<br class="">
> The lookup is cached, and after the AST is loaded, the function<br class="">
> definition will be merged into the original AST.<br class="">
><br class="">
> Right now, in the current patch, this functionality is in the<br class="">
> ASTContext. This is definitely not the right place to put this. So the<br class="">
> question is, do you plan to utilize similar functionality in Clang<br class="">
> tooling or clang tidy?<br class="">
><br class="">
> If yes, we might end up creating a new module for that (or add it to<br class="">
> an existing commonly used one like libtooling?). If no, we will move<br class="">
> the corresponding code to the static analyzer.<br class="">
><br class="">
> What do you think?<br class="">
><br class="">
> In case you are interested in how it works, you can check out the<br class="">
> EuroLLVM talk:<br class="">
> <a href="http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#7" rel="noreferrer" target="_blank" class="">http://llvm.org/devmtg/2017-<wbr class="">03//2017/02/20/accepted-<wbr class="">sessions.html#7</a><br class="">
><br class="">
> Regards,<br class="">
> Gábor<br class="">
<br class="">
<br class="">
--<br class="">
Best regards,<br class="">
Aleksei Sidorin,<br class="">
SRR, Samsung Electronics<br class="">
<br class="">
</blockquote></div>
</div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>