[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 13:41:30 PDT 2024
================
@@ -172,12 +173,11 @@ def get_prefixes(self):
)
if not has_check_fix and not has_check_message and not has_check_note:
- sys.exit(
- "%s, %s or %s not found in the input"
- % (self.fixes.prefix, self.messages.prefix, self.notes.prefix)
- )
+ self.expect_no_diagnosis = True
- assert self.has_check_fixes or self.has_check_messages or self.has_check_notes
+ assert self.expect_no_diagnosis != (
+ self.has_check_fixes or self.has_check_messages or self.has_check_notes
+ )
----------------
5chmidti wrote:
What do you think about emitting a message instead of asserting? I.e., something using `sys.ext` like in the other cases that the script exits?
https://github.com/llvm/llvm-project/pull/91293
More information about the cfe-commits
mailing list