<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 6, 2013, at 3:18 , YuvalShahar <<a href="mailto:yuval.shahar.007@gmail.com">yuval.shahar.007@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>I wrote a checker which I need to run on all translation units, then<br>summarize its output and re-run clang on all translation units<br>(inter-procedural by a pass to collect data and a second pass using it).<br><br>I wish to run clang for the first pass, disabling all checkers but my data<br>collector, but I fail to do this. Any idea?<br><br>I could change the core checkers set (checkers.td), but having to recompile<br>clang and hold two clang versions for thew two passes seems excessive.<br></blockquote></div><br><div>Hi, Yuval. The analyzer will not run properly if the "core" checkers are not run—they help prune infeasible paths. (For example, if you divide by a number 'x', we know that 'x' is non-zero after that point.) However, the other checkers can be turned off using an internal option -analyzer-disable-checker=unix,osx,cplusplus,deadcode; in order to make sure this option reaches the analyzer, you'll have to prepend it with -Xclang.</div><div><br></div><div>If you want to be 100% sure <i>all</i> the other checkers are off, you can see the command line generated by clang --analyze by adding -### to the end. Then you can strip out all the checkers besides "core", and add your own. However, I don't recommend saving the resulting command line because new options are added all the time, and while "clang --analyze" will always do the right thing, "clang -cc1 -analyze..." may be missing some critical options down the line.</div><div><br></div><div>Does this solve your problem?</div><div>Jordan</div><div><br></div><div>P.S. I'd be interested in seeing your setup once you've finished it. General cross-translation-unit analysis is something still off in the future for the analyzer, but when we get there some day we'll need a solid design.</div></body></html>