1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/FileCheck
Thomas Preud'homme e54ac8e70d [FileCheck] Don't diagnose undef vars at parse time
Summary:
Diagnosing use of undefined variables takes place in
parseNumericVariableUse() and printSubstitutions() for numeric variables
but only takes place in printSubstitutions() for string variables. The
reason for the split location of diagnostics is that parsing is not
aware of the clearing of variables due to --enable-var-scope and thus
use of variables cleared in this way can only be catched by
printSubstitutions().

Beyond the code level inconsistency, there is also a user facing
inconsistency since diagnostics look different between the two
functions. While the diagnostic in printSubstitutions is more verbose,
doing the diagnostic there allows to diagnose all undefined variables
rather than just the first one and error out.

This patch create dummy variable definition when encountering a use of
undefined variable so that parsing can proceed and be diagnosed by
printSubstitutions() later. Tests that were testing whether parsing
fails in such case are thus modified accordingly.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64228

llvm-svn: 365219
2019-07-05 16:25:33 +00:00
..
check-a-b-has-b.txt
check-b-a-has-b.txt
check-count.txt
check-dag-multi-prefix-2.txt
check-dag-multi-prefix.txt
check-dag-not-dag.txt
check-dag-overlap-torture.txt
check-dag-overlap.txt
check-dag-substring-prefix.txt
check-dag-xfails.txt
check-dag.txt
check-empty2.txt
check-empty-tag.txt
check-empty.txt
check-label-dag-capture.txt
check-label-dag.txt
check-label.txt
check-multi-prefix-label.txt
check-multiple-prefixes-mixed.txt
check-multiple-prefixes-nomatch-2.txt
check-multiple-prefixes-nomatch.txt
check-multiple-prefixes-substr.txt
check-not-diaginfo.txt
check-prefixes.txt
check-substring-multi-prefix-2.txt
check-substring-multi-prefix.txt
dos-style-eol.txt
dump-input-annotations.txt
dump-input-enable.txt [CommandLine] Change help output to prefix long options with -- instead of -. NFC . Part 3 of 5 2019-05-03 17:47:29 +00:00
empty-regex-match-at-start.txt
envvar-opts.txt
first-character-match.txt
implicit-check-not.txt
line-count-2.txt
line-count.txt [FileCheck] Stop qualifying expressions as numeric 2019-06-19 23:47:24 +00:00
lit.local.cfg
match-full-lines.txt
multiple-missing-prefixes.txt
next-no-match.txt
no-check-file.txt
no-multi-suffixes.txt
numeric-defines-diagnostics.txt [FileCheck] Factor some parsing checks out 2019-07-05 12:01:06 +00:00
numeric-defines.txt [FileCheck] Introduce substitution subclasses 2019-05-23 00:10:29 +00:00
numeric-expression.txt [FileCheck] Don't diagnose undef vars at parse time 2019-07-05 16:25:33 +00:00
opt-color.txt
regex-brackets.txt
regex-no-match.txt
same.txt
separate-multi-prefix.txt
simple-var-capture.txt
string-defines-diagnostics.txt FileCheck: Return parse error w/ Error & Expected 2019-06-19 23:47:10 +00:00
string-defines.txt [FileCheck] Introduce substitution subclasses 2019-05-23 00:10:29 +00:00
two-checks-for-same-match.txt
validate-check-prefix.txt
var-ref-same-line.txt
var-scope.txt FileCheck [6/12]: Introduce numeric variable definition 2019-06-06 13:21:06 +00:00
verbose.txt FileCheck [6/12]: Introduce numeric variable definition 2019-06-06 13:21:06 +00:00