[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 15:12:29 PDT 2020


probinson added a comment.

In D77227#1955727 <https://reviews.llvm.org/D77227#1955727>, @jdenny wrote:

> In D77227#1955596 <https://reviews.llvm.org/D77227#1955596>, @probinson wrote:
>
> > Okay, 1500+ tests to fix seems excessive.  Requiring CHECK directives to be on lines by themselves (with optional comment) is more restrictive than the LLVM test suite can tolerate.
>
>
> Maybe the right rule should be that it *either* appears on a line by itself  *or* at the beginning of some single-line comment style (which might not be at the beginning of a line).


Worth a shot.

>> If I leave out the filtering on "RUN:" then I get 10,660 hits, instead of 387.  So, if we want a diagnostic aid like this in FileCheck itself, it really needs to skip RUN: lines.
> 
> The above rule would rule out FileCheck prefixes within RUN lines.

There aren't going to be FileCheck directives on a RUN line, so excluding RUN lines from the "does this line have a potentially incorrect directive on it?" check, won't filter out any true positives.  It will filter out about 98% of the false positives.

Or am I not understanding your comment?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77227





More information about the llvm-commits mailing list