[PATCH] D53710: [FileCheck] Warn if a prefix is only used in LABEL checks

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 13:24:42 PST 2018


probinson added a comment.

Okay, clearly I have not been paying attention.  It's not that `lit -v` enables the warning, it is simply not suppressing the message. This is why `lit` without `-v` appears to turn it "off."  I get it now.  As far as FileCheck itself is concerned, this is always-on.
Have you tried running the entire suite with `lit -v` to see how often the diagnostic comes up?  Now that you don't emit a diagnostic for the multiple-prefix case.



================
Comment at: test/FileCheck/check-prefixes-only-labels.txt:4
+foo
+; FOO-LABEL: foo
+
----------------
FileCheck's own tests generally use unnecessary regexes in the check lines, so that that check lines don't match themselves.  That is, this line would want to be something like this:
```
FOO-LABEL: {{f}}oo
```
Now in this particular test, it doesn't really matter, but I think for consistency across FileCheck tests I would prefer to see the braces.

Note this comment applies to all the tests.


https://reviews.llvm.org/D53710





More information about the llvm-commits mailing list