<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - FileCheck CHECK-NOT always succeeds if uses an undefined var"
href="https://bugs.llvm.org/show_bug.cgi?id=46880">46880</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>FileCheck CHECK-NOT always succeeds if uses an undefined var
</td>
</tr>
<tr>
<th>Product</th>
<td>Test Suite
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>lit
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jdenny.ornl@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>daniel@zuster.org, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I tried the following example at 9f86b8ec41f0:
```
$ cat check
CHECK-NOT: [[VAR]]
$ cat input
the input doesn't matter
$ FileCheck -dump-input=always -vv check < input |& tail -7
<<<<<<
1: the input doesn't matter
not:1'0 X~~~~~~~~~~~~~~~~~~~~~~~
not:1'1 uses undefined variable(s): "VAR"
2:
eof:1 ^
<span class="quote">>>>>>></span >
$ echo $?
0
```
It succeeds regardless of the input. I think any use of an undefined variable
should be a failure, regardless of whether the directive is positive or
negative.
Discussed at:
<<a href="https://reviews.llvm.org/D83650#inline-781031">https://reviews.llvm.org/D83650#inline-781031</a>></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>