[PATCH] D20925: FileCheck: print input on errors

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 4 17:48:31 PDT 2016


My only concern would maybe be verbosity (sometimes the input could be
quite large and drown out everything else). But overall this solves an
issue that I've run into too.

I would also suggest to print something more clear like "Begin FileCheck
Input: *********" << .... << "End FileCheck Input: *********" to
distinguish it from the surrounding and be easy to search for (in case of a
very large input).

-- Sean Silva

On Thu, Jun 2, 2016 at 10:46 AM, Dmitry Vyukov via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> dvyukov created this revision.
> dvyukov added a reviewer: llvm-commits.
>
> FileCheck output is unactionable without intput. Print input on errors.
>
> Are there any downsides of this?
> I am ready to bargain about details like output only stdin.
>
>
>
> http://reviews.llvm.org/D20925
>
> Files:
>   utils/FileCheck/FileCheck.cpp
>
> Index: utils/FileCheck/FileCheck.cpp
> ===================================================================
> --- utils/FileCheck/FileCheck.cpp
> +++ utils/FileCheck/FileCheck.cpp
> @@ -1407,5 +1407,8 @@
>        break;
>    }
>
> +  if (hasError)
> +    errs() << "Input:" << '\n' << Buffer.str() << '\n';
> +
>    return hasError ? 1 : 0;
>  }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160604/9d2bdf92/attachment.html>


More information about the llvm-commits mailing list