[PATCH] D20925: FileCheck: print input on errors

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 05:37:53 PDT 2016


On Sun, Jun 5, 2016 at 2:48 AM, Sean Silva <chisophugis at gmail.com> wrote:
> 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 guess everybody run into this problem.
I think we need to bound amount of output by X KB.

> 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).

I am fine with it.
Will change, but first I want to hear if somebody feels brave enough to LGTM it.


> -- 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
>>
>


More information about the llvm-commits mailing list