1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/utils
Joel E. Denny 7663136ac6 [FileCheck] Extend -dump-input with substitutions
Substitutions are already reported in the diagnostics appearing before
the input dump in the case of failed directives, and they're reported
in traces (produced by `-vv -dump-input=never`) in the case of
successful directives.  However, those reports are not always
convenient to view while investigating the input dump, so this patch
adds the substitution report to the input dump too.  For example:

```
$ cat check
CHECK: hello [[WHAT:[a-z]+]]
CHECK: [[VERB]] [[WHAT]]

$ FileCheck -vv -DVERB=goodbye check < input |& tail -8
<<<<<<
           1: hello world
check:1       ^~~~~~~~~~~
           2: goodbye word
check:2'0     X~~~~~~~~~~~ error: no match found
check:2'1                  with "VERB" equal to "goodbye"
check:2'2                  with "WHAT" equal to "world"
>>>>>>
```

Without this patch, the location reported for a substitution for a
directive match is the directive's full match range.  This location is
misleading as it implies the substitution itself matches that range.
This patch changes the reported location to just the match range start
to suggest the substitution is known at the start of the match.  (As
in the above example, input dumps don't mark any range for
substitutions.  The location info in that case simply identifies the
right line for the annotation.)

Reviewed By: mehdi_amini, thopre

Differential Revision: https://reviews.llvm.org/D83650
2020-07-28 19:15:18 -04:00
..
benchmark Reapply "Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories." 2020-07-22 17:50:19 -07:00
bugpoint
count
crosstool
docker Harmonize Python shebang 2020-07-16 21:53:45 +02:00
emacs
FileCheck [FileCheck] Extend -dump-input with substitutions 2020-07-28 19:15:18 -04:00
fpcmp
gdb-scripts
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 [X86] Remove disabled miscompiling X86CondBrFolding pass 2020-07-28 23:35:04 +03:00
jedit
kate
KillTheDoctor
lint Harmonize Python shebang 2020-07-16 21:53:45 +02:00
lit [docs] [lit] Add a more helpful description for lit.py's -s flag. 2020-07-28 14:36:03 -07:00
llvm-build
llvm-lit
llvm-locstats
LLVMVisualizers
Misc
not
PerfectShuffle
release [test-release] fallback to py3's venv module 2020-07-21 19:51:15 -05:00
Reviewing
sanitizers
TableGen [Support] Use InitLLVM in llvm-stress, sancov and TableGen 2020-07-28 07:50:45 -04:00
Target/ARM
testgen Harmonize Python shebang 2020-07-16 21:53:45 +02:00
textmate
unittest Use INTERFACE_COMPILE_OPTIONS to disable -Wsuggest-override for any target that links to gtest 2020-07-27 08:37:01 -07:00
UpdateTestChecks [Utils][Fix] remove unnecessary ; at the end 2020-07-19 20:48:28 +02:00
valgrind
vim vim: add bfloat keyword 2020-06-18 17:06:06 +00:00
vscode
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
collect_and_build_with_pgo.py
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
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl
GetSourceVersion
getsrcs.sh
indirect_calls.py
lldbDataFormatters.py
llvm-compilers-check
llvm-gisel-cov.py
llvm-native-gxx
llvm.grm
LLVMBuild.txt
llvmdo
llvmgrep
prepare-code-coverage-artifact.py
schedcover.py Harmonize Python shebang 2020-07-16 21:53:45 +02:00
shuffle_fuzz.py
shuffle_select_fuzz_tester.py
sort_includes.py
unicode-case-fold.py
update_analyze_test_checks.py [Utils] Check function attributes in update_test_checks 2020-07-19 20:07:24 +02:00
update_cc_test_checks.py [Utils] Check function attributes in update_test_checks 2020-07-19 20:07:24 +02:00
update_llc_test_checks.py [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py 2020-07-08 11:00:10 +01:00
update_mca_test_checks.py
update_mir_test_checks.py
update_test_checks.py [Utils] Check function attributes in update_test_checks 2020-07-19 20:07:24 +02:00
UpdateCMakeLists.pl
wciia.py