<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Mar 29, 2011, at 1:30 PM, Chandler Carruth wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite">Sorry to dredge up an old thread, but I'm trying to get some policy clarification:<br><br><div class="gmail_quote">On Fri, Mar 11, 2011 at 6:49 PM, 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 id=":5on">Added: cfe/trunk/test/<span class="il">Analysis</span>/<span class="il">iterators</span>.<span class="il">cpp</span><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/iterators.cpp?rev=127525&view=auto" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/<span class="il">Analysis</span>/<span class="il">iterators</span>.<span class="il">cpp</span>?rev=127525&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/<span class="il">Analysis</span>/<span class="il">iterators</span>.<span class="il">cpp</span> (added)<br>
+++ cfe/trunk/test/<span class="il">Analysis</span>/<span class="il">iterators</span>.<span class="il">cpp</span> Fri Mar 11 20:49:15 2011<br>
@@ -0,0 +1,104 @@<br>
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.<span class="il">Iterators</span> -verify %s<br>
+<br>
+#include <vector></div></blockquote></div><br><div>I thought test cases were expected to be freestanding? Before this one, there were only two tests that violate that requirement. Thoughts?</div><div><br></div><div>
For reference, we build and run all Clang and LLVM tests in a freestanding environment out of necessity, so we end up catching these.</div>
</blockquote></div><br><div>The problem with making this freestanding is that it doesn't test that the checker works on a given platform. The definitions of std::vector are allowed to vary, so having tests check against the local version actually helps us catch bugs in the checker.</div><div><br></div><div>The other problem with making this freestanding is that simply copying the required parts from <vector> may not be an option if we want to keep the test case free of GPL code (in the case of using the stdc++ provided with GCC). We of course could use the definition from LLVM's libc++, but then we wouldn't again be testing against what the user is always using when they compile.</div></body></html>