<br><br><div class="gmail_quote">On Tue, Dec 9, 2008 at 2:15 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Dec 7, 2008, at 11:15 AM, Zhongxing Xu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add '-mode' option to scan-build. 'intra' mode is the same as before. 'inter' mode makes ccc-analyzer do -serialize on each compile action.<br>
The patch looks a little messy. But that should be diff's problem. Actually only a few lines are added. No functional change should be incurred.<br>
</blockquote>
<br></div>
Hi Zhongxing,<br>
<br>
I don't think this is the right approach.  Checks that are inter-procedural should just transparently cause "inter-procedural behavior" in scan-build.  There is no reason to burden users with this concept in the UI.<br>

<br>
Also, I think the concept you are thinking about is "whole-program analysis", not inter-procedural analysis.  We can do the latter without the former, albeit only a translation unit at a time.  Doing inter-procedural analysis at the translation unit level seems like a more logical starting point to me then adding a fuzzy option to scan-build that doesn't do anything.<br>

<br>
Moreover, since core pieces needed for whole-program analysis aren't in place (e.g., full AST serialization, indexing over a whole-program image so we can perform whole-program analysis), it just seems strange to add an option to this effect.  We actually don't know yet what the whole program image will look like, and it will likely consist of more than just serializing out ASTs.<br>

<br>
Once we have more of these pieces in place, I think scan-build can transparently do whole-program analysis by simply delaying doing analysis until after the build completes.  From the user perspective this is clean and simple.  There is simply no reason to distinguish between "intra" and "inter" modes, at least at this point.<br>
<font color="#888888">
<br>
Ted</font></blockquote><div></div><div>I see. My original intention is to use it to do serialization tests along with the build process. Then I'll just keep it for my own use. </div></div><br>