This is an archive of the discontinued LLVM Phabricator instance.

FileCheck Enhancements

Authored by eklepilkina on May 26 2016, 2:06 AM.



Patch for RFC:FileCheck Enhancements!topic/llvm-dev/q1TDIf6urDI

There was idea to add new directives to FileCheck:

  1. Directive to use some patterns as named template with or without parameters.
  2. CHECK-INCLUDE - Directive to include other file with checks to another.
  3. Expressions repeat for CHECK - If statement should be checked several times repeat modifiers {n}, {n,m} , {,n}, {n,}, *, + can be used.
  4. Repeat in regexs - Repeat with current number should become available by using {n}, {n,m} , {,n}, {n,}
  5. CHECK-LABEL-DAG - Not sequential order of labels.
  7. Wildcard for prefixes - If some statements should be checked regardless prefix, it should be used {{*}}, {{*}}-NEXT, //{{*}}-SAME and etc.
  8. Prefix with regular expressions - If statement should be checked if prefix matches some regular expression, it should be used {{regex}}:, {{regex}}-NEXT and etc.

More information

Diff Detail

Event Timeline

eklepilkina retitled this revision from to FileCheck Enhancements.
eklepilkina updated this object.
eklepilkina changed the edit policy from "All Users" to "Administrators".
probinson edited edge metadata.May 26 2016, 4:37 PM

Thanks for providing the sample patch. It's rather large! I suggest that after the llvm-dev discussion settles down and we know exactly which features sound good, that you should post individual patches for those features that can be reviewed independently. I'll make a few general suggestions now that should help speed those reviews.

  • Patches should be made against the trunk version.
  • Each patch should implement just one feature, which can be reviewed and discussed independently.
  • Avoid unrelated formatting changes. The clang-format tool can operate on just the lines you have modified for a patch. It would be acceptable to provide a first patch that does nothing more than run clang-format on the original upstream file. This will help avoid distracting reviewers with non-functional formatting changes.
  • Do not include your SYNOPSYS comment tags in the upstream patches.

Thanks for working on FileCheck!

vsk added a subscriber: vsk.May 27 2016, 11:33 AM
eklepilkina abandoned this revision.Jul 17 2016, 10:52 PM