r353718 - Make test actually test something (colons were missing)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 11:19:39 PST 2019
I thin the Best Fix is probably to make FileCheck diag if a line starts with (after a few whitelisted comment chars like // and #) a check-prefix but then isn't followed by : (maybe after -NOT, -SAME, -LABEL etc).
FileCheck doesn't explicitly pass over leading comment characters, it just pattern-matches the check names followed by colon or hyphen. You can put arbitrary text in front of a check name and FileCheck won't care (although your reviewers might).
I can see the value in a diag like this. It does mean any use of a check name that isn't *intended* to be a directive would be flagged (e.g., in a random comment within the test). That pattern-match is case-sensitive and our convention is to use uppercase check names, so it probably wouldn't be TOO bad.
If anybody wants to do this I'm happy to review it. Or file a PR and cc me.
--paulr
who has done a lot of FileCheck patch reviewing lately
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190211/5bf72b21/attachment-0001.html>
More information about the cfe-commits
mailing list