<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 2:20 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was thinking more like this could succeed:<br>
; CHECK: foo<br>
; CHECK-ANYWHERE: bar<br>
; CHECK-NEXT: baz<br>
<br>
bar <- second<br>
baz <- third<br>
foo  <- first match<br>
<br>
The goal being to handle something like the vtable layout tests, which<br>
would look like:<br>
<br>
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm-only<br>
-fdump-vtable-layouts |& FileCheck %s<br>
...<br>
namespace Test1 {<br>
// CHECK-ANYWHERE:      Vtable for 'Test1::A' (3 entries).<br>
// CHECK-NEXT:   0 | offset_to_top (0)<br>
// CHECK-NEXT:   1 | Test1::A RTTI<br>
// CHECK-NEXT:       -- (Test1::A, 0) vtable address --<br>
// CHECK-NEXT:   2 | void Test1::A::f()<br>
struct A {<br>
  virtual void f();<br>
};<br>
void A::f() { }<br>
}<br>
<br>
Instead of the current repeated FileChecks with prefixes:<br>
<br>
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm-only<br>
-fdump-vtable-layouts > %t 2>&1<br>
// RUN: FileCheck --check-prefix=CHECK-1 %s < %t<br>
// RUN: FileCheck --check-prefix=CHECK-2 %s < %t<br>
...<br>
// CHECK-1:      Vtable for 'Test1::A' (3 entries).<br>
// CHECK-1-NEXT:   0 | offset_to_top (0)<br>
// CHECK-1-NEXT:   1 | Test1::A RTTI<br>
// CHECK-1-NEXT:       -- (Test1::A, 0) vtable address --<br>
// CHECK-1-NEXT:   2 | void Test1::A::f()<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div style>I see. You can still associate all NEXTs with the previous match even if it's ANYWHERE. This doesn't require you to reset the line, though, if you follow the suggestion I outlined. Or you could prohibit CHECK and CHECK-ANYWHERE in the same test file (they can coexist with different prefixes). Otherwise, I think the interaction between them is just a means to create undecipherable tests.</div>
<div style><br></div><div style>Eli</div><div style><br></div><div><br></div><div><br></div></div></div></div>