[PATCH] D55825: [FileCheck] Suppress old -v/-vv diags if dumping input

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 07:05:44 PST 2018


jdenny created this revision.
jdenny added a reviewer: probinson.
Herald added subscribers: kristina, hiraditya, kristof.beyls, javed.absar.

The old diagnostic form of the trace produced by -v and -vv looks
like:

  check1:1:8: remark: CHECK: expected string found in input
  CHECK: abc 
         ^
  <stdin>:1:3: note: found here
  ; abc def 
    ^~~

When dumping annotated input is requested (via -dump-input), I find
that this old trace is not useful and is sometimes harmful:

1. The old trace is mostly redundant because the same basic information also appears in the input dump's annotations.

2. The old trace buries any error diagnostic between it and the input dump, but I find it useful to see any error diagnostic up front.

3. FILECHECK_OPTS=-dump-input=fail requests annotated input dumps only for failed FileCheck calls.  However, I have to also add -v or -vv to get a full set of annotations, and that can produce massive output from all FileCheck calls in all tests.  That's a real problem when I run this in the IDE I use, which grinds to a halt as it tries to capture all that output.

When -dump-input=fail|always, this patch suppresses the old trace from
-v or -vv.  Error diagnostics still print as usual.  If you want the 
old trace, perhaps to see variable expansions, you can set 
-dump-input=none (the default).


Repository:
  rL LLVM

https://reviews.llvm.org/D55825

Files:
  llvm/docs/CommandGuide/FileCheck.rst
  llvm/lib/Support/FileCheck.cpp
  llvm/test/FileCheck/dump-input-annotations.txt
  llvm/test/FileCheck/dump-input-enable.txt
  llvm/utils/FileCheck/FileCheck.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55825.178666.patch
Type: text/x-patch
Size: 18093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181218/938598b7/attachment.bin>


More information about the llvm-commits mailing list