<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 12, 2012, at 11:22 , Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>It's there on the analyzer site, under "<a href="http://clang-analyzer.llvm.org/scan-build.html">Command Line Usage</a>":</div><div><br></div><div><div style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><br class="webkit-block-placeholder"></div><blockquote type="cite"><b>scan-build</b> has little or no knowledge about how you build your code. It works by overriding the <tt style="">CC</tt> and <tt style="">CXX</tt> environment variables to (hopefully) change your build to use a "fake" compiler instead of the one that would normally build your project. This fake compiler executes either <tt style="">clang</tt> or <tt style="">gcc</tt> (depending on the platform) to compile your code and then executes the static analyzer to analyze your code.</blockquote><div><br class="webkit-block-placeholder"></div></div><div><br></div><div><blockquote type="cite"></blockquote></div><div><blockquote type="cite"><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">The reason</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">configure</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">also needs to be run through</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">scan-build</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">is because</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">scan-build</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">scans your source files by</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><i style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">interposing</i><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">on the compiler. This interposition is currently done by</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">scan-build</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">temporarily se</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">tting the environment variable</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">CC</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">to</span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><tt style="font-size: small; line-height: 19px; text-align: left; ">ccc-analyzer</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">. The program</span><tt style="font-size: small; line-height: 19px; text-align: left; ">ccc-analyzer</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">acts like a fake compiler, forwarding its command line arguments over to the compiler to perform regular compilation and</span><tt style="font-size: small; line-height: 19px; text-align: left; ">clang</tt><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; "> </span><span style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; font-size: small; line-height: 19px; text-align: left; ">to perform static analysis.</span></blockquote></div><div><br></div><div>I guess we should throw a link to that page into the downloadable "checker" package, and possibly into scan-build itself.</div></div></blockquote><br></div><div>Oh right, we do have a man page. Yes, we should update that.</div><br></body></html>