[PATCH] D83682: [FileCheck] Add docs for --allow-empty

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 10:27:15 PDT 2020


MaskRay added a comment.

In D83682#2149531 <https://reviews.llvm.org/D83682#2149531>, @jhenderson wrote:

> In D83682#2149473 <https://reviews.llvm.org/D83682#2149473>, @MaskRay wrote:
>
> > https://lists.llvm.org/pipermail/llvm-dev/2020-July/143344.html discusses --allow-empty, but I still don't get why we need --allow-empty.
>
>
> I think the idea is to prevent unexpected empty output from occurring in cases when --allow-empty is not specified. In a case where all a user cares about is that some string doesn't appear in the output, that might help make the test more robust (because they expect some output, just not what they specified), although honestly I'm not convinced, hence my proposal in the mailing list to change it to --expect-empty.


I don't know why we want to make empty input a built-in special behavior... In that case, the test can make the intention explicit by specifying an option, say, --expect-non-empty:

  # RUN: command | FileCheck %s --expect-non-empty
  # CHECK-NOT: aaa
  # CHECK-NOT: bbb




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83682





More information about the llvm-commits mailing list