[PATCH] D82203: [FileCheck] Implement -dump-input-context and -dump-input-filter

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 08:34:30 PDT 2020


jdenny added a comment.

In D82203#2114309 <https://reviews.llvm.org/D82203#2114309>, @Meinersbur wrote:

> The LABEL can be large as well (or the test does not have labels), but I think it would a nice feature to have in addition to line limits since it is not as arbitrary as a number of lines. Both approaches can be combined, i.e. restrict emitted lines to within two labels, even if `-dump-input-context` alone would print lines before and after.


A question would be which label section.  Given the patch under review, I think `-dump-input-filter=error` is an intuitive way to answer that question, and `-dump-input-context=label` is an intuitive way to specify the full label section should be dumped as the context of the error.  Something like `-dump-input-context=label+10` could be a way to indicate additional context outside the label section, if that's useful.

> Just asking to consider this, it might be too difficult to implement.

I think the main challenge would be that label information is normally not available to the input dump implementation unless `-v` is specified, but we could make `-dump-input-context=label` enable it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82203/new/

https://reviews.llvm.org/D82203





More information about the llvm-commits mailing list