<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 2:00 PM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5">On Wed, Apr 10, 2013 at 1:40 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems like we have a bunch of tests where we really don't care<br>
about ordering.  Should we add support to FileCheck for that?<br>
<br>
For example, this test uses repeated filecheck runs on the temp file<br>
output with different prefixes just to work around this problem:<br>
<a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-layout.cpp?view=markup" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-layout.cpp?view=markup</a><br>
I had the same problem while working on vbtable layout.<br>
<br>
This is a big grep test that can't easily be filecheck-ified because<br>
there's no out of order matching:<br>
<a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m?revision=174461&view=markup" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m?revision=174461&view=markup</a><br>


I'd like to filecheck-ify that test because there's something wrong<br>
with the grep escaping on my system.<br>
<br>
I propose CHECK-ANYWHERE, or something else with the same behavior.<br>
Basically, this is a check directive that just resets the matching<br>
cursor back the beginning of the file.  Any subsequent checks follow<br>
from the end of a successful match.  Any captured variables are<br>
preserved, mostly because removing them would be hard.</blockquote><div><br></div></div></div><div>The proposal is interesting, but I have doubts about the proposed implementation. Wouldn't this make the semantics of some tests very... unusual? Consider this:</div>

<div><br></div><div>CHECK: foo</div><div>CHECK-EVERYWHERE: bar</div><div>CHECK: baz</div><div><br></div><div>Is this going to match:</div><div><br></div><div>baz</div><div>
foo</div><div>bar</div><div><br></div><div>That's kind-of weird :-)</div></div></div></div></blockquote><div><br></div><div style>I figured I should be more constructive :-)</div><div style>An alternative proposal without this problem (AFAICS) is to collect all "-EVERYWHERE" checks and run them separately in the end on the whole file. They're order-independent, so this seems safe. And oh while we're at it, let's call it CHECK-GLOBAL and also have CHECK-GLOBAL-NOT because that one would be really useful for rewriting some 'not grep' tests.</div>
<div style><br></div><div style>Eli</div><div style><br></div><div> </div></div></div></div>