[PATCH] D79276: [FileCheck] Support comment directives
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 10:14:24 PDT 2020
jdenny marked an inline comment as done.
jdenny added inline comments.
================
Comment at: llvm/test/FileCheck/comment/after-words.txt:1
+# Comment prefixes are not recognized at ends of words.
+
----------------
jdenny wrote:
> thopre wrote:
> > How about characters that cannot be part of an identifier? E.g. would "@COM:" be interpreted as a comment? Should we only accept comment prefix if it's a space or beginning of line before?
> Yes, this patch interprets `@COM:` as a comment directive.
>
> My justification is that, to keep things simple for the FileCheck user and implementation, I tried to keep parsing of comment directives and check directives as similar as possible. One intentional difference is that comment directives are ignored if they have check suffixes, such as `-NOT`.
`git grep '@RUN'` shows that `@` without a following space might be a comment style we should support. Here's an example match:
```
llvm/test/MC/ARM/ldr-pseudo-cond-darwin.s:@RUN: llvm-mc -triple armv7-base-apple-darwin %s | FileCheck --check-prefix=CHECK-ARM --check-prefix=CHECK %s
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79276/new/
https://reviews.llvm.org/D79276
More information about the cfe-commits
mailing list