<div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 30, 2012 at 2:25 PM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com" target="_blank" class="cremed">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="im">On Aug 30, 2012, at 2:18 PM, Ted Kremenek <<a href="mailto:kremenek@apple.com" class="cremed">kremenek@apple.com</a>> wrote:<br>
<br>
> On Aug 30, 2012, at 1:48 PM, Matt Beaumont-Gay <<a href="mailto:matthewbg@google.com" class="cremed">matthewbg@google.com</a>> wrote:<br>
><br>
>> On Thu, Aug 30, 2012 at 12:26 PM, Ted Kremenek <<a href="mailto:kremenek@apple.com" class="cremed">kremenek@apple.com</a>> wrote:<br>
>>> --- cfe/trunk/include/clang/Frontend/CompilerInvocation.h (original)<br>
>>> +++ cfe/trunk/include/clang/Frontend/CompilerInvocation.h Thu Aug 30 14:26:38 2012<br>
>>> @@ -13,7 +13,7 @@<br>
>>> #include "clang/Basic/LangOptions.h"<br>
>>> #include "clang/Basic/TargetOptions.h"<br>
>>> #include "clang/Basic/FileSystemOptions.h"<br>
>>> -#include "clang/Frontend/AnalyzerOptions.h"<br>
>>> +#include "clang/StaticAnalyzer/AnalyzerOptions.h"<br>
>><br>
>> Hi Ted,<br>
>><br>
>> This introduces a cyclic dependency between StaticAnalyzer and<br>
>> Frontend (lib/StaticAnalyzer/Frontend/FrontendActions.cpp includes<br>
>> "clang/Frontend/CompilerInstance.h"). Can we factor these headers to<br>
>> fix the cycle?<br>
>><br>
>> -Matt<br>
><br>
> Hi Matt,<br>
><br>
> I don't see how this introduces that dependency. Wasn't it there already? AnalyzerOptions.h does not include anything from clang/Frontend. I didn't change any of the other headers. I'm not contesting that there is a cyclic dependency; I just don't see how I introduced one.<br>
><br>
> Ted<br>
<br>
</div>Oh, I see what you mean. I'm not certain if this really is a cyclic dependency. AnalyzerOptions.h is really a "leaf" header that doesn't include anything else. It just defines a common object to pass data from the frontend to the analyzer engine.</blockquote>
<div><br></div><div>Yea, the only problem is that the SA/Frontend library depends heavily on the Frontend library. We build all of the SA into a single library, but we probably shouldn't. Because we do that, when we check the library-level include layering, we find a cycle.</div>
<div><br></div><div>Here is one question perhaps, which of the 3 SA sub-libraries should this header belong to?</div><div><br></div><div>Or actually, why do we need both Frontend/AnalyzerOptions.h and StaticAnalyzer/AnalyzerOptions? Could we merge the latter into the former? </div>
</div></div>