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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to