This revision was automatically updated to reflect the committed changes. Closed by commit rGb90fdb7c117f: [clang-tidy][test] Allow specifying potentially unused suffixes (authored by njames93).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97322/new/ https://reviews.llvm.org/D97322 Files: clang-tools-extra/test/clang-tidy/check_clang_tidy.py clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp Index: clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp +++ clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp @@ -30,13 +30,6 @@ // RUN: | FileCheck %s -check-prefix=CHECK-HEADER-NO-FUNC \ // RUN: -implicit-check-not="{{warning|error}}:" -/// Suppress FileCheck --allow-unused-prefixes=false diagnostics. -// CHECK-MESSAGES-RANGES: {{^}} -// CHECK-MESSAGES-CUSTOM: {{^}} -// CHECK-MESSAGES-CUSTOM-SYS: {{^}} -// CHECK-MESSAGES-CUSTOM-NO-SYS: {{^}} -// CHECK-MESSAGES-CUSTOM-NO-HEADER: {{^}} - // CHECK-HEADER-NO-FUNC: warning: modernize-loop-convert: 'MakeReverseRangeHeader' is set but 'MakeReverseRangeFunction' is not, disabling reverse loop transformation // Make sure appropiate headers are included Index: clang-tools-extra/test/clang-tidy/check_clang_tidy.py =================================================================== --- clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -119,9 +119,12 @@ has_check_messages = has_check_messages or has_check_message has_check_notes = has_check_notes or has_check_note - check_fixes_prefixes.append(check_fixes_prefix) - check_messages_prefixes.append(check_messages_prefix) - check_notes_prefixes.append(check_notes_prefix) + if has_check_fix: + check_fixes_prefixes.append(check_fixes_prefix) + if has_check_message: + check_messages_prefixes.append(check_messages_prefix) + if has_check_note: + check_notes_prefixes.append(check_notes_prefix) assert has_check_fixes or has_check_messages or has_check_notes # Remove the contents of the CHECK lines to avoid CHECKs matching on
Index: clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp +++ clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-reverse.cpp @@ -30,13 +30,6 @@ // RUN: | FileCheck %s -check-prefix=CHECK-HEADER-NO-FUNC \ // RUN: -implicit-check-not="{{warning|error}}:" -/// Suppress FileCheck --allow-unused-prefixes=false diagnostics. -// CHECK-MESSAGES-RANGES: {{^}} -// CHECK-MESSAGES-CUSTOM: {{^}} -// CHECK-MESSAGES-CUSTOM-SYS: {{^}} -// CHECK-MESSAGES-CUSTOM-NO-SYS: {{^}} -// CHECK-MESSAGES-CUSTOM-NO-HEADER: {{^}} - // CHECK-HEADER-NO-FUNC: warning: modernize-loop-convert: 'MakeReverseRangeHeader' is set but 'MakeReverseRangeFunction' is not, disabling reverse loop transformation // Make sure appropiate headers are included Index: clang-tools-extra/test/clang-tidy/check_clang_tidy.py =================================================================== --- clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -119,9 +119,12 @@ has_check_messages = has_check_messages or has_check_message has_check_notes = has_check_notes or has_check_note - check_fixes_prefixes.append(check_fixes_prefix) - check_messages_prefixes.append(check_messages_prefix) - check_notes_prefixes.append(check_notes_prefix) + if has_check_fix: + check_fixes_prefixes.append(check_fixes_prefix) + if has_check_message: + check_messages_prefixes.append(check_messages_prefix) + if has_check_note: + check_notes_prefixes.append(check_notes_prefix) assert has_check_fixes or has_check_messages or has_check_notes # Remove the contents of the CHECK lines to avoid CHECKs matching on
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits