1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/utils
Joel E. Denny 20f8c79d86 [FileCheck] Fix numeric error propagation
A more general name might be match-time error propagation.  That is,
it's conceivable we'll one day have non-numeric errors that require
the handling fixed by this patch.

Without this patch, FileCheck behaves as follows:

```
$ cat check
CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]

$ FileCheck -vv -dump-input=never check < input
check:1:54: remark: implicit EOF: expected string found in input
CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
                                                     ^
<stdin>:2:1: note: found here

^
check:1:15: error: unable to substitute variable or numeric expression: overflow error
CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
              ^
$ echo $?
0
```

Notice that the exit status is 0 even though there's an error.
Moreover, FileCheck doesn't print the error diagnostic unless both
`-dump-input=never` and `-vv` are specified.

The same problem occurs when `CHECK-NOT` does have a match but a
capture fails due to overflow: exit status is 0, and no diagnostic is
printed unless both `-dump-input=never` and `-vv` are specified.  The
usefulness of capturing from `CHECK-NOT` is questionable, but this
case should certainly produce an error.

With this patch, FileCheck always includes the error diagnostic and
has non-zero exit status for the above examples.  It's conceivable
that this change will cause some existing tests to fail, but my
assumption is that they should fail.  Moreover, with nearly every
project enabled, this patch didn't produce additional `check-all`
failures for me.

This patch also extends input dumps to include such numeric error
diagnostics for both expected and excluded patterns.

As noted in fixmes in some of the tests added by this patch, this
patch worsens an existing issue with redundant diagnostics.  I'll fix
that bug in a subsequent patch.

Reviewed By: thopre, jhenderson

Differential Revision: https://reviews.llvm.org/D98086
2021-03-17 19:25:41 -04:00
..
benchmark [benchmark] Replace references to M680x0 with M68k 2021-03-06 01:04:36 +00:00
bugpoint
count
crosstool
docker Harmonize Python shebang 2020-07-16 21:53:45 +02:00
emacs [Utils] Add missing attributes in syntax files 2021-03-05 17:36:09 +00:00
FileCheck [FileCheck] Fix numeric error propagation 2021-03-17 19:25:41 -04:00
fpcmp
gdb-scripts Avoid fragile type lookups in GDB pretty printer 2021-01-22 14:56:32 +01:00
git Add a git hook script that can be manually setup to run some checks on every push 2020-06-24 21:13:43 +00:00
gn [gn build] Port 9a5af541ee05 2021-03-16 14:03:53 +00:00
jedit
kate [Utils] Add missing attributes in syntax files 2021-03-05 17:36:09 +00:00
KillTheDoctor [KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries 2020-09-07 16:08:55 +03:00
lint Harmonize Python shebang 2020-07-16 21:53:45 +02:00
lit [lit] Harmonize test timing data between Unix and Windows 2021-03-17 07:42:40 -04:00
llvm-lit Execute llvm-lit with the python found by CMake by default 2020-08-03 10:51:35 +01:00
llvm-locstats
LLVMVisualizers Fix MSVC natvis visualisation of llvm::FixedVectorTyID and ScalableVectorTyID 2021-02-15 13:43:31 +00:00
Misc
not PrintStackTrace: don't symbolize if LLVM_DISABLE_SYMBOLIZATION is set 2020-08-21 11:27:13 -07:00
PerfectShuffle
release Bump the trunk major version to 13 2021-01-26 19:37:55 -08:00
Reviewing
sanitizers
TableGen [TableGen] Fix excessive compile time issue in FixedLenDecoderEmitter 2021-03-17 09:28:50 +00:00
Target/ARM
testgen Harmonize Python shebang 2020-07-16 21:53:45 +02:00
textmate
unittest llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
UpdateTestChecks Replace func name with regex for update test scripts 2021-03-12 17:37:09 -08:00
valgrind
vim [Utils] Add missing attributes in syntax files 2021-03-05 17:36:09 +00:00
vscode [Utils] Add missing attributes in syntax files 2021-03-05 17:36:09 +00:00
yaml-bench
abtest.py
add_argument_names.py
bisect
bisect-skip-count
bugpoint_gisel_reducer.py
check_ninja_deps.py [utils] New script check_ninja_deps.py 2020-07-14 14:54:08 +01:00
check-each-file
chunk-print-before-all.py
clang-parse-diagnostics-file
codegen-diff Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
collect_and_build_with_pgo.py docs: Add pointer to cmake caches for PGO 2020-12-07 15:55:26 -05:00
convert-constraint-log-to-z3.py Recommit "[ConstraintSystem] Add helpers to deal with linear constraints." 2020-09-15 12:07:26 +01:00
countloc.sh
create_ladder_graph.py
demangle_tree.py
DSAclean.py Harmonize Python shebang 2020-07-16 21:53:45 +02:00
DSAextract.py Harmonize Python shebang 2020-07-16 21:53:45 +02:00
extract_symbols.py
extract_vplan.py [utils] Fix regexp in llvm/utils/extract_vplan.py to extract VPlans. 2020-08-19 08:57:12 +01:00
extract-section.py [M68k] Fix extract-section.py under Python 3 2021-03-14 11:36:57 -07:00
findmisopt
findoptdiff Recommit "[IPConstProp] Remove and move tests to SCCP." 2020-08-02 22:23:54 +01:00
findsym.pl Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
GenLibDeps.pl Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
GetSourceVersion
getsrcs.sh
indirect_calls.py
lldbDataFormatters.py [llvm][utils] Fix innocuous off by one in lldb formatters 2021-02-26 08:10:41 -08:00
llvm-compilers-check Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
llvm-gisel-cov.py
llvm-native-gxx Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
llvm-original-di-preservation.py [Debugify][OriginalDIMode] Export the report into JSON file 2021-03-11 01:11:13 -08:00
llvm.grm [NFC] Add x86_amx and some missed half, bfloat keywords to llvm plugin syntaxes 2021-03-03 10:01:10 +08:00
llvmdo
llvmgrep
merge-stats.py [NFC] Add utility to sum/merge stats files 2020-08-07 19:02:42 +02:00
prepare-code-coverage-artifact.py
remote-exec.py Added utility to launch tests on a target remotely. 2020-10-23 20:52:30 +04:00
schedcover.py Harmonize Python shebang 2020-07-16 21:53:45 +02:00
shuffle_fuzz.py
shuffle_select_fuzz_tester.py
sort_includes.py
sysroot.py sysroot.py: add support for darwin 2021-02-18 10:48:18 -05:00
unicode-case-fold.py
update_analyze_test_checks.py [UpdateTestChecks] Fix update_analyze_test_checks.py failure 2020-12-29 11:56:59 +09:00
update_cc_test_checks.py [Utils] Support lit-like substitutions in update_cc_test_checks 2021-03-16 10:36:22 -07:00
update_llc_test_checks.py Replace func name with regex for update test scripts 2021-03-12 17:37:09 -08:00
update_mca_test_checks.py
update_mir_test_checks.py
update_test_checks.py [Utils] Check for more global information in update_test_checks 2021-03-11 23:31:16 -06:00
update_test_prefix.py [utils] Fix UpdateTestChecks case where 2 runs differ for last label 2020-12-15 07:16:54 -08:00
UpdateCMakeLists.pl
wciia.py