<div dir="ltr">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 class="gmail_extra"><div class="gmail_quote"><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 style>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 style><br></div><div style>CHECK: foo</div><div style>CHECK-EVERYWHERE: bar</div><div style>CHECK: baz</div><div style><br></div><div style>Is this going to match:</div><div style><br></div><div style>baz</div><div style>
foo</div><div style>bar</div><div style><br></div><div style>That's kind-of weird :-)</div><div style><br></div><div style>Eli</div><div><br></div></div></div></div>