[llvm-bugs] [Bug 46880] New: FileCheck CHECK-NOT always succeeds if uses an undefined var
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 28 16:36:37 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46880
Bug ID: 46880
Summary: FileCheck CHECK-NOT always succeeds if uses an
undefined var
Product: Test Suite
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: lit
Assignee: unassignedbugs at nondot.org
Reporter: jdenny.ornl at gmail.com
CC: daniel at zuster.org, llvm-bugs at lists.llvm.org
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 ^
>>>>>>
$ 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:
<https://reviews.llvm.org/D83650#inline-781031>
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200728/fed03351/attachment.html>
More information about the llvm-bugs
mailing list