<div dir="ltr">Thanks!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 9:00 AM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dexonsmith<br>
Date: Thu Mar  5 11:00:05 2015<br>
New Revision: 231379<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=231379&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=231379&view=rev</a><br>
Log:<br>
FileCheck: Document CHECK-SAME, follow-up to r230612<br>
<br>
Modified:<br>
    llvm/trunk/docs/CommandGuide/FileCheck.rst<br>
<br>
Modified: llvm/trunk/docs/CommandGuide/FileCheck.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/FileCheck.rst?rev=231379&r1=231378&r2=231379&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/FileCheck.rst?rev=231379&r1=231378&r2=231379&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/docs/CommandGuide/FileCheck.rst (original)<br>
+++ llvm/trunk/docs/CommandGuide/FileCheck.rst Thu Mar  5 11:00:05 2015<br>
@@ -185,6 +185,31 @@ For example, something like this works a<br>
 newline between it and the previous directive.  A "``CHECK-NEXT:``" cannot be<br>
 the first directive in a file.<br>
<br>
+The "CHECK-SAME:" directive<br>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
+<br>
+Sometimes you want to match lines and would like to verify that matches happen<br>
+on the same line as the previous match.  In this case, you can use "``CHECK:``"<br>
+and "``CHECK-SAME:``" directives to specify this.  If you specified a custom<br>
+check prefix, just use "``<PREFIX>-SAME:``".<br>
+<br>
+"``CHECK-SAME:``" is particularly powerful in conjunction with "``CHECK-NOT:``"<br>
+(described below).<br>
+<br>
+For example, the following works like you'd expect:<br>
+<br>
+.. code-block:: llvm<br>
+<br>
+   !0 = !MDLocation(line: 5, scope: !1, inlinedAt: !2)<br>
+<br>
+   ; CHECK:       !MDLocation(line: 5,<br>
+   ; CHECK-NOT:               column:<br>
+   ; CHECK-SAME:              scope: ![[SCOPE:[0-9]+]]<br>
+<br>
+"``CHECK-SAME:``" directives reject the input if there are any newlines between<br>
+it and the previous directive.  A "``CHECK-SAME:``" cannot be the first<br>
+directive in a file.<br>
+<br>
 The "CHECK-NOT:" directive<br>
 ~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>