<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="">Hi Alexander,<div class=""><br class=""></div><div class="">This sounds like an exciting project.<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 2, 2016, at 12:45 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" 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 style="font-size:12.8px" class="">Devin has started writing scripts for running additional analyzer tests as described in this thread:</div></blockquote><div class=""><br class=""></div><div class="">A buildbot sounds like the perfect idea! </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"><div style="font-size:12.8px" class="">The idea was to check out the tests/projects from the existing repos instead of copying them. Would it be possible to do the same with these tests?</div></blockquote><div class=""><br class=""></div><div class="">Eh? What do you mean? Would that stop someone from running them in the clang unit test infrastructure?</div></div></div></blockquote><div><br class=""></div><div>Yes. There are separate build bot scripts to detect regressions on real-world projects. These scripts (in clang/utils/analyzer/) run `scan-build` on projects and compare the analysis results to expected reference results, causing an internal build bot to fail when there is a difference. We use these scripts to maintain coverage on real-world code, where analysis time is often much too long to run as part of clang’s normal hand-crafted, minimized regression tests. As Anna alluded to above, these scripts can also be used to avoid checking in benchmark source code to the reference results repository. Apple uses these scripts internally to detect analyzer regressions — and we will be adding a public-facing build bot to Green Dragon <<a href="http://lab.llvm.org:8080/green/" class="">http://lab.llvm.org:8080/green/</a>> in the relatively near future with reference results checked into a public llvm repository.</div><div><br class=""></div><div>As to whether these tests should be run as part of clang’s regular regression tests or as a separate build bot, I think there are two key questions:</div><div><br class=""></div><div>1) Are the tests licensed under the UIUC license? Any code contributed to clang needs to be under the UIUC license. If these tests are not, we can use the download-and-patch strategy that Anna mentioned. The scripts in clang/utils/analyzer/ would probably be useful here — although you might have to write a harness to build the tests if one does not already exist.</div><div>2) How long does it take to run these tests? If it takes minutes, they are probably better suited to running on a separate build bot.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="">Is there any way to treat static analyzer warnings as plain old warnings/errors? Dumping them to a plist file from a command line compilation is a bit annoying, and I think is incompatible with the clang unit testing infrastructure?</div></div></blockquote><div><br class=""></div><div>The tests in clang/tests/Analysis use the same lit.py-based infrastructure as the rest of clang and can use the same “ // expect-warning {{…}}” annotations — so in general, there is no need to dump to a plist. We do dump plists in some cases to test that proper path diagnostics are being generated (see, for example, test/Analysis/null-deref-path-notes.m), but for most tests these aren’t needed.</div><div><br class=""></div><div>Devin</div></div><br class=""></div></div></body></html>