<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 Feb 4, 2016, at 3:52 PM, <Alexander G. Riccio> <<a href="mailto:test35965@gmail.com" class="">test35965@gmail.com</a>> <Alexander G. Riccio> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">I'm still not quite used to the archaic mailing list format, but I thought the proper thing to do when replying to a message on a mailing list is to do a reply all? I totally missed these three messages, because they were part of the silly "batched" messages. </div><div class=""><br class=""></div><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;"><span style="font-size: 12.8px;" class="">Consider making "no </span><span style="font-size: 12.8px;" class="">detailed analysis" an option for -enable-analyze-</span><span style="font-size: 12.8px;" class="">pass</span><span style="font-size: 12.8px;" class=""> to help with these </span><span style="font-size: 12.8px;" class="">use cases</span><br class=""></blockquote><div class=""><br class=""></div><div class="">Eh? Do you mean less detailed output or less detailed analysis done by clang?<br class=""></div><div class=""><br class=""></div><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;"><span style="font-size: 12.8px;" class="">Another possible (not mutually exclusive) extension point to add static</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">analysis into would be through the Tooling interface and compilation</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">databases - this would allow just the analysis to be run, without making it</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">part of a build (no one would make static analysis part of an interactive</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">build, it's too slow, right? the only reason it was integrated into the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">build with scan-build was because it was the best way to discover the build</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">commands - but the Tooling/Compilation Database system allows us to</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">separate build discovery from tool execution)</span><br style="font-size: 12.8px;" class=""></blockquote><div class=""><br class=""></div><div class="">I'm not (yet) terribly familiar with the tooling interface. What exactly do you mean? Also: what do you mean by "interactive build"?</div><div class=""> </div><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;"><span style="font-size: 12.8px;" class="">Adding a flag to a build is also a much lower barrier to entry to get</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">started.  </span><br class=""></blockquote><div class=""><br class=""></div><div class="">Example #1: I don't have Perl. Not many machines have Perl. That makes scan-build problematic.</div><div class=""><br class=""></div><div class="">"Not many" is<span class="Apple-converted-space"> </span><a href="http://www.fastcompany.com/3026446/the-fall-of-perl-the-webs-most-promising-language" target="_blank" class="">relative to Python</a>.<span class="Apple-converted-space"> </span><a href="http://www.talyarkoni.org/blog/2013/11/18/the-homogenization-of-scientific-computing-or-why-python-is-steadily-eating-other-languages-lunch/" target="_blank" class="">Python ate the world</a>.</div><div class=""> <br class=""></div><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;"><span style="font-size: 12.8px;" class="">If the work is done right, then the combined compile+</span><span style="font-size: 12.8px;" class="">analyze</span><span style="font-size: 12.8px;" class=""> execution</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">could be faster than a compile action followed by an </span><span style="font-size: 12.8px;" class="">analyze</span><span style="font-size: 12.8px;" class=""> action.  If</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">you're willing to give up "#ifndef __clang_analyzer__", then the AST</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">from the compile can be reused by the analyzer.</span><br class=""></blockquote></div></div></blockquote><div><br class=""></div>We cannot drop support for “#ifndef __clang_analyzer__”, which many users rely on for false positive suppression.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><br class=""></div><div class="">Not just faster, but also better. Currently the analyzer makes some inlining decisions on its own; currently the analyzer can't make use of any kind of analysis or folding done by the optimization passes. </div></div></div></blockquote><br class="">Since the analyzer works on the AST level, it will not be able to utilize the llvm analysis.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><br class=""></div><div class="">I'll CC some other static analysis (more knowledgeable & important that me) people.</div><div class=""><br class=""></div><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;"><span style="font-size: 12.8px;" class="">Message: 2</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Date: Tue, 2 Feb 2016 10:49:55 -0600</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">From: "Craig, Ben via cfe-dev" <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">To: David Blaikie <</span><a href="mailto:dblaikie@gmail.com" target="_blank" style="font-size: 12.8px;" class="">dblaikie@gmail.com</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Cc: Clang Dev <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Subject: Re: [cfe-dev] Idea for better invoking static analysis via</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">        command line</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Message-ID: <</span><a href="mailto:56B0DE33.9020107@codeaurora.org" target="_blank" style="font-size: 12.8px;" class="">56B0DE33.9020107@codeaurora.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Content-Type: text/plain; charset="utf-8"; Format="flowed"</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">The judgment of "how much slower is too much slower" is pretty</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">subjective, and depends on the project.  Increasing a project's build</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">from 30 seconds to 5 minutes is probably too much for that project.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Increasing a project's build from 45 minutes to 55 minutes is probably</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">fine though.</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Adding a flag to a build is also a much lower barrier to entry to get</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">started.  There are a lot of build systems out there, and scan-build and</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">compilation databases only work easily with a few of those systems.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Adding a build flag is pretty easy on every build system that I've ever</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">worked with.</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">If the work is done right, then the combined compile+</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class=""> execution</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">could be faster than a compile action followed by an </span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class=""> action.  If</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">you're willing to give up "#ifndef __clang_analyzer__", then the AST</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">from the compile can be reused by the analyzer.  Even if you aren't</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">willing to give up that feature, doing a compile of a file immediately</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">followed by an analysis of the same file is probably going to be faster</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">than doing all the compiles then all the analyzes due to disk caching</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">effects.</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">On 2/2/2016 10:23 AM, David Blaikie wrote:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Another possible (not mutually exclusive) extension point to add</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> static analysis into would be through the Tooling interface and</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> compilation databases - this would allow just the analysis to be run,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> without making it part of a build (no one would make static analysis</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> part of an interactive build, it's too slow, right? the only reason it</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> was integrated into the build with scan-build was because it was the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> best way to discover the build commands - but the Tooling/Compilation</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Database system allows us to separate build discovery from tool execution)</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> On Tue, Feb 2, 2016 at 6:19 AM, Craig, Ben via cfe-dev</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class=""> <mailto:</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">>> wrote:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     I'm all for this idea.  There is precedent for this in other tools</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     (Visual Studio's /</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">).  I think it also greatly reduces the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     need for build interposition via scan-build.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     I would ask that you think carefully about the output format of</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     the detailed analysis for -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">. If people are</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     using -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class=""> on most of their builds, then plist and</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     html reports are likely to go unread for the most part.  Consider</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     making "no detailed analysis" an option for -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     to help with these use cases.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     On 1/29/2016 9:04 PM, <Alexander G. Riccio> via cfe-dev wrote:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     As mentioned by myself, Aaron Ballman, and Philip Reames, in a</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     reply to "Proposal: Integrate static analysis test suites", the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     fact that static analysis generates a totally different set of</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     warnings than compilation (not a superset), is surprising to some.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     One possibility, in order to preserve the current behavior for</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     any tools that rely on this, is to add an option to clang,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     something like "-enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">" that the user can specify</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     to run analysis AND compilation.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     Thoughts?</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     Sincerely,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     Alexander Riccio</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     --</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     "Change the world or go home."</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     </span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">about.me/ariccio</a><span style="font-size: 12.8px;" class=""> <</span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://about.me/ariccio</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     <</span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://about.me/ariccio</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     If left to my own devices, I will build more.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     ⁂</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     ______________________________</span><span style="font-size: 12.8px;" class="">_________________</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     cfe-dev mailing list</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     </span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class=""> <mailto:</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>>     </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     --</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     Employee of Qualcomm Innovation Center, Inc.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     ______________________________</span><span style="font-size: 12.8px;" class="">_________________</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     cfe-dev mailing list</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     </span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class=""> <mailto:</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">>     </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">--</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Employee of Qualcomm Innovation Center, Inc.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">-------------- next part --------------</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">An HTML attachment was scrubbed...</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">URL: <</span><a href="http://lists.llvm.org/pipermail/cfe-dev/attachments/20160202/e3ce5c8a/attachment-0001.html" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/pipermail/cfe-dev/attachments/20160202/e3ce5c8a/attachment-0001.html</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""></blockquote><div class=""> </div><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;"><span style="font-size: 12.8px;" class="">Message: 1</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Date: Tue, 2 Feb 2016 08:23:51 -0800</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">From: David Blaikie via cfe-dev <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">To: "Craig, Ben" <</span><a href="mailto:ben.craig@codeaurora.org" target="_blank" style="font-size: 12.8px;" class="">ben.craig@codeaurora.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Cc: Clang Dev <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Subject: Re: [cfe-dev] Idea for better invoking static analysis via</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">        command line</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Message-ID:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">        <CAENS6Eu-2WDA=</span><a href="mailto:f6qre94bQKv3paQsfMd6Krs6OF%2Bz0OGXPwPag@mail.gmail.com" target="_blank" style="font-size: 12.8px;" class="">f6qre94bQKv3paQsfMd6Krs6OF+z0OGXPwPag@mail.gmail.com</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Content-Type: text/plain; charset="utf-8"</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Another possible (not mutually exclusive) extension point to add static</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">analysis into would be through the Tooling interface and compilation</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">databases - this would allow just the analysis to be run, without making it</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">part of a build (no one would make static analysis part of an interactive</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">build, it's too slow, right? the only reason it was integrated into the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">build with scan-build was because it was the best way to discover the build</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">commands - but the Tooling/Compilation Database system allows us to</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">separate build discovery from tool execution)</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">On Tue, Feb 2, 2016 at 6:19 AM, Craig, Ben via cfe-dev <</span><br style="font-size: 12.8px;" class=""><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">> wrote:</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> I'm all for this idea.  There is precedent for this in other tools (Visual</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Studio's /</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">).  I think it also greatly reduces the need for build</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> interposition via scan-build.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> I would ask that you think carefully about the output format of the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> detailed analysis for -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">.  If people are using</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class=""> on most of their builds, then plist and html reports</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> are likely to go unread for the most part.  Consider making "no detailed</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> analysis" an option for -enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class=""> to help with these use cases.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> On 1/29/2016 9:04 PM, <Alexander G. Riccio> via cfe-dev wrote:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> As mentioned by myself, Aaron Ballman, and Philip Reames, in a reply to</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> "Proposal: Integrate static analysis test suites", the fact that static</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> analysis generates a totally different set of warnings than compilation</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> (not a superset), is surprising to some.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> One possibility, in order to preserve the current behavior for any tools</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> that rely on this, is to add an option to clang, something like</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> "-enable-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">analyze</span><span style="font-size: 12.8px;" class="">-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">" that the user can specify to run analysis AND</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> compilation.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Thoughts?</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Sincerely,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Alexander Riccio</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> --</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> "Change the world or go home."</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">about.me/ariccio</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> <</span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://about.me/ariccio</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> If left to my own devices, I will build more.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> ⁂</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> ______________________________</span><span style="font-size: 12.8px;" class="">_________________</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> cfe-dev mailing<span class="Apple-converted-space"> </span><a href="mailto:listcfe-dev@lists.llvm.orghttp" class="">listcfe-dev@lists.llvm.</a></span><span style="font-size: 12.8px;" class=""><a href="mailto:listcfe-dev@lists.llvm.orghttp" class="">orghttp</a>://</span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> --</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Employee of Qualcomm Innovation Center, Inc.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> ______________________________</span><span style="font-size: 12.8px;" class="">_________________</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> cfe-dev mailing list</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">-------------- next part --------------</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">An HTML attachment was scrubbed...</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">URL: <</span><a href="http://lists.llvm.org/pipermail/cfe-dev/attachments/20160202/c94f40c1/attachment-0001.html" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/pipermail/cfe-dev/attachments/20160202/c94f40c1/attachment-0001.html</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">------------------------------</span><br class=""></blockquote><div class=""><br class=""></div><div class=""> </div><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;"><span style="font-size: 12.8px;" class="">Message: 3</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Date: Tue, 2 Feb 2016 08:19:03 -0600</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">From: "Craig, Ben via cfe-dev" <</span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">To: </span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Subject: Re: [cfe-dev] Idea for better invoking static analysis via</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">        command line</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Message-ID: <</span><a href="mailto:56B0BAD7.5030309@codeaurora.org" target="_blank" style="font-size: 12.8px;" class="">56B0BAD7.5030309@codeaurora.org</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Content-Type: text/plain; charset="utf-8"; Format="flowed"</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">I'm all for this idea.  There is precedent for this in other tools</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">(Visual Studio's /analyze).  I think it also greatly reduces the need</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">for build interposition via scan-build.</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">I would ask that you think carefully about the output format of the</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">detailed analysis for -enable-analyze-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">.  If people are using</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">-enable-analyze-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class=""> on most of their builds, then plist and html</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">reports are likely to go unread for the most part.  Consider making "no</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">detailed analysis" an option for -enable-analyze-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class=""> to help with these</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">use cases.</span><br style="font-size: 12.8px;" class=""><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">On 1/29/2016 9:04 PM, <Alexander G. Riccio> via cfe-dev wrote:</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> As mentioned by myself, Aaron Ballman, and Philip Reames, in a reply</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> to "Proposal: Integrate static analysis test suites", the fact that</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> static analysis generates a totally different set of warnings than</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> compilation (not a superset), is surprising to some.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> One possibility, in order to preserve the current behavior for any</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> tools that rely on this, is to add an option to clang, something like</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> "-enable-analyze-</span><span style="font-size: 12.8px; background-color: rgb(255, 255, 255);" class="">pass</span><span style="font-size: 12.8px;" class="">" that the user can specify to run analysis AND</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> compilation.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Thoughts?</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Sincerely,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> Alexander Riccio</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> --</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> "Change the world or go home."</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">about.me/ariccio</a><span style="font-size: 12.8px;" class=""> <</span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://about.me/ariccio</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> <</span><a href="http://about.me/ariccio" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://about.me/ariccio</a><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> If left to my own devices, I will build more.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> ⁂</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">></span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> ______________________________</span><span style="font-size: 12.8px;" class="">_________________</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> cfe-dev mailing list</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="font-size: 12.8px;" class="">cfe-dev@lists.llvm.org</a><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" style="font-size: 12.8px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br style="font-size: 12.8px;" class=""></blockquote></div><div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span style="font-size: 12.8000001907349px;" class="">Sincerely,</span><br style="font-size: 12.8000001907349px;" class=""><span style="font-size: 12.8000001907349px;" class="">Alexander Riccio</span><br style="font-size: 12.8000001907349px;" class=""><span style="font-size: 12.8000001907349px;" class="">--</span><br style="font-size: 12.8000001907349px;" class=""><span style="font-size: 12.8000001907349px;" class="">"Change the world or go home."</span><div style="font-size: 12.8000001907349px;" class=""><a href="http://about.me/ariccio" target="_blank" class="">about.me/ariccio</a></div><div style="font-size: 12.8000001907349px;" class=""><a href="http://about.me/ariccio" target="_blank" class=""><br class=""></a></div><div style="font-size: 12.8000001907349px;" class="">If left to my own devices, I will build more.</div><div style="font-size: 12.8000001907349px;" class="">⁂</div></div></div></div></div></div><br class=""><div class="gmail_quote">On Fri, Jan 29, 2016 at 10:04 PM, <Alexander G. Riccio><span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:test35965@gmail.com" target="_blank" class="">test35965@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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" class=""><div class="">As mentioned by myself, Aaron Ballman, and Philip Reames, in a reply to "Proposal: Integrate static analysis test suites", the fact that static analysis generates a totally different set of warnings than compilation (not a superset), is surprising to some.</div><div class=""><br class=""></div><div class="">One possibility, in order to preserve the current behavior for any tools that rely on this, is to add an option to clang, something like "-enable-analyze-pass" that the user can specify to run analysis AND compilation.</div><div class=""><br class=""></div><div class="">Thoughts?</div><br clear="all" class=""><div class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span style="font-size: 12.8px;" class="">Sincerely,</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Alexander Riccio</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">--</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">"Change the world or go home."</span><div style="font-size: 12.8px;" class=""><a href="http://about.me/ariccio" target="_blank" class="">about.me/ariccio</a></div><div style="font-size: 12.8px;" class=""><a href="http://about.me/ariccio" target="_blank" class=""><br class=""></a></div><div style="font-size: 12.8px;" class="">If left to my own devices, I will build more.</div><div style="font-size: 12.8px;" class="">⁂</div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div><br class=""></body></html>