[clang-tidy][test] Allow specifying potentially unused suffixes
authorNathan James <n.james93@hotmail.co.uk>
Wed, 24 Feb 2021 15:22:53 +0000 (15:22 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Wed, 24 Feb 2021 15:22:54 +0000 (15:22 +0000)
commitb90fdb7c117fab83a8a2d1c95ed468c47e480f89
tree308eefb34a963bc66a99127ba4864f6e4a495575
parentff6dc053b7ba8ffb7d02c9c4560fe80b66b117b8
[clang-tidy][test] Allow specifying potentially unused suffixes

If a check-suffix is only required for a CHECK-FIXES or CHECK-MESSAGES. check_clang_tidy will pass the prefixes CHECK-FIXES<...> and CHECK-MESSAGES<...> to FileCheck.
This will result in a FileCheck failing because of an unused prefix.

This addresses the problem by not passing unused prefixes. Its also possible to fix this be passing `--allow-unused-prefixes` flag to FileCheck, but seeing as we have already done the legwork in the script to see its unused, this fix seems the better way to go.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97322
clang-tools-extra/test/clang-tidy/check_clang_tidy.py
clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp