[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 15:17:43 PDT 2020
jdenny added a comment.
In D77227#1955767 <https://reviews.llvm.org/D77227#1955767>, @jroelofs wrote:
> 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).
>
>
> So only diagnose if it meets those conditions (with some inferred comment delimiter based on file extension/flag?),
I think it would be easier just to look for any common single-line comment style regardless of file type.
> but is also missing the colon?
That still bugs me because prefixes mentioned in English sentences in comments can easily wrap to the start of a comment line.
I still say complex diagnostics like that one should be opt-in, perhaps via a separate script. Besides, it's probably easier to build arbitrary, user-configurable heuristics in python than in C++ within FileCheck.
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