Hi Ben,<br><br>On Monday, November 30, 2015, Craig, Ben <<a href="mailto:ben.craig@codeaurora.org">ben.craig@codeaurora.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    One of the reasons the clang static analyzer doesn't support cross
    TU analysis is because of scaling issues.  The core static analysis
    algorithm is super-exponential.  There are some caps put into place
    so that execution eventually finishes.</div></blockquote><div><br></div><div>Gotcha. I assumed there was a scaling issue, but I'm surprised to see it's super exponential. I'd naively guess a tree with N nodes and M edges would be analyzed in some sort of polynomial time. Looks like I've got some reading to do!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><br>
    <br>
    There have been recent discussions regarding cross-function and
    cross-TU analysis here:<br>
<a href="http://clang-developers.42468.n3.nabble.com/analyzer-Summary-IPA-thoughts-td4048239.html" target="_blank">http://clang-developers.42468.n3.nabble.com/analyzer-Summary-IPA-thoughts-td4048239.html</a></div><div bgcolor="#FFFFFF" text="#000000"><br></div></blockquote><div><br></div><div>Ah, a good place to start :)</div><div><br></div><div>Thanks again!</div><div>Andrew<span></span> </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">On 11/29/2015 10:27 AM, Andrew Melo
      wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">Hi Ben,
        <div><br>
        </div>
        <div>Thanks for the mail,</div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Mon, Nov 23, 2015 at 12:00 PM,
            Craig, Ben via cfe-dev <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','cfe-dev@lists.llvm.org');" target="_blank"></a><a href="javascript:_e(%7B%7D,'cvml','cfe-dev@lists.llvm.org');" target="_blank">cfe-dev@lists.llvm.org</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                I'm not sure that I fully understand your question. 
                Here are some attempts by me to answer some of the
                questions I think you are asking.<br>
                <br>
                How do I make one combined index.html for the bug
                reports in my two distinct projects?<br>
                <blockquote>Have you tried to use -o <output
                  location>, and have both projects point to the same
                  location?  I don't know for sure if this will work or
                  not, but it's worth a shot.<br>
                </blockquote>
                <br>
                How do I do cross-project analysis?  For example, how do
                I find null dereference bugs when projectA invokes a
                function in projectB incorrectly?<br>
                <blockquote>The clang static analyzer doesn't support
                  this right now.  It doesn't even really support
                  finding bugs when crossing translation units.  It can
                  find cross-function issues when all the functions are
                  in the same translation unit.<br>
                </blockquote>
              </div>
            </blockquote>
            <div>I was looking for the latter. I didn't realize the
              static analysis was limited to a single translation unit,
              which is why my question probably didn't make a lot of
              sense. I guess the limitation is that the control-flow
              graph can grow to be unboundedly large as you combine
              translation units together?</div>
            <div><br>
            </div>
            <div>Thanks for the help,</div>
            <div>Andrew</div>
            <div><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <blockquote>
                </blockquote>
                <span>
                  <div>On 11/23/2015 11:15 AM, Andrew Melo via cfe-dev
                    wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <pre>Hello all,

I've been using clang's static analyzer to clean up some code and find
some particularly tricky bugs that have been haunting me for a while.
It's working great!

Our project is broken into multiple independent subprojects (each with
their own makefile, etc..), so when I run scan-build on each
subproject in sequence, a lot of the context gets lost when control
goes from projectA to projectB and back again. Is there a way to have
scan-build combine the ASTs from the different projects together to
give it the global view? We currently have:

projectA$ scan-build make
projectB$ scan-build make

Is there some way to have scan-build do something the equivalent of:

$ scan-build --combine projectA/scan-output projectB/scan-output

Thanks!
Andrew
</pre>
                  </blockquote>
                  <br>
                </span><span><font color="#888888">
                    <pre cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre>
                  </font></span></div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div>--<br>
            Andrew Melo<br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre>
  </div></blockquote><div> </div><div> </div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div><div> </div><br><br>-- <br>It's dark in this basement.<br>