<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Richard,<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 1, 2018, at 2:50 PM, Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">This looks like the wrong fix to me, but I don't really know enough about what's being done with ExprMutationAnalyzer to have an opinion on what the right fix is.</div><div class=""><br class=""></div><div class="">Shuai, what is the goal here? Why is this code being moved to Analysis/?</div></div></div></div></div></div></div></blockquote><div><br class=""></div><div>I’ve asked for this possibility, as I wanted to use it from the Clang static analyzer.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""> Do you intend to call it from the compiler frontend at some point? I can see a code review for the move itself, but no discussion of a plan or overall direction being followed here. Did I miss it?</div><div class=""><br class=""></div><div class="">We have historically decided to not use the tooling interfaces (ASTMatcher, ParentMap, etc) from the frontend,</div></div></div></div></div></div></div></blockquote><div><br class=""></div><div>Clang analyzer uses ASTMatcher all over the place.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""> because they're generally a poor fit for our goals (we aim for a largely-single-pass compilation with good locality, and the AST matchers make different design choices)</div></div></div></div></div></div></div></blockquote><div><br class=""></div><div>That’s totally good for the analyzer though, right?</div><div><br class=""></div><div>In any case, in future it might make sense to move the analyzer out of Clang proper.</div><div>But for know the only way to use clang-tidy utilities from the analyzer is to move them into Clang.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">. If you want to change that, we'll need to discuss that decision.</div><div class=""><br class=""></div><div class="">If the idea is to move this code into clang proper so that it can be used by various different tooling clients, we'd need to discuss the right place for it. Perhaps lib/Tooling/Analysis would make sense?</div></div></div></div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, 1 Oct 2018 at 13:13, David Blaikie via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">I can't really reproduce this - when I try to build clang/llvm with LLVM_ENABLE_MODULES in CMake I'm still seeing an error I reported March on a cfe-dev thread - something to do with unique_ptr instantiations for MappedBlockStream in the PDB parsing code.<br class=""><br class="">So, I'm wondering what error you hit, Eric/where/how, etc... <br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Sep 30, 2018 at 10:23 AM Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank" class="">eric@efcs.ca</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">+rsmith (actually this time)<br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Sep 30, 2018 at 12:09 PM Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank" class="">eric@efcs.ca</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">+rsmith<br class=""><div class=""><br class=""></div><div class="">Hi All,</div><div class=""><br class=""></div><div class="">Sorry, I'm not actually sure why this fix is correct.I stole both the fix and the comment from a similar one on L150 of the module map left by Richard Smith.</div><div class=""><br class=""></div><div class="">/Eric</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Sep 25, 2018 at 8:36 PM Shuai Wang <<a href="mailto:shuaiwang@google.com" target="_blank" class="">shuaiwang@google.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">I'd like to understand this better as well, in particular what would be a proper fix?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Sep 25, 2018 at 2:15 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">+Shuai Wang<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Sep 25, 2018 at 2:14 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hey Eric - thanks for the fix - but could you explain the issue here in a bit more detail, as I'm a bit confused (& really interested in understanding any layering problems in LLVM - and fixing them/making sure they're fixed/holding the line/etc)<br class=""><br class="">What do you mean by "pull all of the AST matchers library into clang" - how does including a header ever add a link dependency?<br class=""><br class="">- Dave</div><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Sep 22, 2018 at 5:49 PM Eric Fiselier via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ericwf<br class="">
Date: Sat Sep 22 17:48:05 2018<br class="">
New Revision: 342827<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342827&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=342827&view=rev</a><br class="">
Log:<br class="">
Fix modules build with shared library.<br class="">
<br class="">
r341994 caused clangAnalysis to pull all of the AST matchers<br class="">
library into clang. Due to inline key functions in the headers,<br class="">
importing the AST matchers library gives a link dependency on the<br class="">
AST matchers (and thus the AST), which clang should not<br class="">
have.<br class="">
<br class="">
This patch works around the issues by excluding the offending<br class="">
libclangAnalysis header in the modulemap.<br class="">
<br class="">
Modified:<br class="">
cfe/trunk/include/clang/module.modulemap<br class="">
<br class="">
Modified: cfe/trunk/include/clang/module.modulemap<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=342827&r1=342826&r2=342827&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=342827&r1=342826&r2=342827&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/include/clang/module.modulemap (original)<br class="">
+++ cfe/trunk/include/clang/module.modulemap Sat Sep 22 17:48:05 2018<br class="">
@@ -5,6 +5,12 @@ module Clang_Analysis {<br class="">
textual header "Analysis/Analyses/ThreadSafetyOps.def"<br class="">
<br class="">
module * { export * }<br class="">
+<br class="">
+ // FIXME: Exclude these headers to avoid pulling all of the AST matchers<br class="">
+ // library into clang. Due to inline key functions in the headers,<br class="">
+ // importing the AST matchers library gives a link dependency on the AST<br class="">
+ // matchers (and thus the AST), which clang-format should not have.<br class="">
+ exclude header "Analysis/Analyses/ExprMutationAnalyzer.h"<br class="">
}<br class="">
<br class="">
module Clang_AST {<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div></div></blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div>
_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits<br class=""></div></blockquote></div><br class=""></body></html>