<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>The FileCheck documentation states of CHECK-LABEL:</p>
<p>> It is treated identically to a normal <code class="docutils
        literal notranslate">
<span class="pre">CHECK</span></code> directive except that FileCheck makes an additional assumption that a line matched by the directive cannot also be matched by any other check present in
<code class="docutils literal notranslate"><span class="pre">match-filename</span></code>;</p>
<p>However:</p>
<p>$ cat > fchecktest.txt<br>
</p>
<p>#CHECK-LABEL: flang2<br>
#CHECK: foo baz<br>
<br>
flang1 foo bar<br>
flang2 foo baz<br>
</p>
<p>$ grep -v -e '^#' fchecktest.txt | bin/FileCheck fchecktest.txt <br>
</p>
<p>(passes)<br>
</p>
<p>The behaviour of the above suggests contrary to the documentation - that foo baz can indeed be matched against the label line "flang2", i.e. check-label does not consume the whole line as the docs seem to imply.</p>
<p>I believe that FileCheck is working as intended and that the docs are just a bit confusing. Is that right?<br>
</p>
<p>The use-case is matching flang1 and flang2 invocations by the clang driver in -### output, and the intent is to be able to match something appearing in one without accidentally matching the other.<br>
</p>
<p>- Peter<br>
</p>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.
</body>
</html>