[all-commits] [llvm/llvm-project] b90fdb: [clang-tidy][test] Allow specifying potentially un...

Nathan James via All-commits all-commits at lists.llvm.org
Wed Feb 24 07:23:17 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b90fdb7c117fab83a8a2d1c95ed468c47e480f89
      https://github.com/llvm/llvm-project/commit/b90fdb7c117fab83a8a2d1c95ed468c47e480f89
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2021-02-24 (Wed, 24 Feb 2021)

  Changed paths:
    M clang-tools-extra/test/clang-tidy/check_clang_tidy.py
    M clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list