[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Congcong Cai via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Julian Schmidt via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Congcong Cai via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Julian Schmidt via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/5] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Julian Schmidt via cfe-commits
@@ -226,6 +226,11 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +print(clang_tidy_output) +if

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Julian Schmidt via cfe-commits
@@ -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,

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. Overall LGTM, just two small nits. W.r.t flag or no flag: This seems to be so rarely used (judging from the single test file that needed modification), that not having the flag is fine IMO. A check writer doesn't have to know about this

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/4] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Danny Mösch via cfe-commits
@@ -226,6 +226,11 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +print(clang_tidy_output) +if

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. I like this much more than an explicit option. However, consider my feedback as suggestions only as I don't have that much of experience with the project. I might miss or misinterpret something.

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > And why is this not a valid test? No `CHECK-*` comments in the reference > file, so no violations from `clang-tidy` are expected? Because the FileCheck don't support empty input. https://github.com/llvm/llvm-project/pull/91293

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I remove the command line option. Instead, when input don't have any check, check-clang-tidy will assume it should not diagnose anything. https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: > If nothing is provided, then nothing can be detected. And why is this not a valid test? No `CHECK-*` comments in the reference file, so no violations from `clang-tidy` are expected? > `not` will treat non-zero return code as success. It is totally different > thing. 

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Why can the tests not just accept reference files that do not contain any > CHECK-* comments? run-clang-tidy do assert for this, since FileCheck need to use this information to check the result. If nothing is provided, then nothing can be detected. > Also, isn't there

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: Why can the tests not just accept reference files that do not contain any `CHECK-*` comments? Then, no separate argument would be needed. In fact, I still sometimes struggle to find the correct options, command line and `CHECK-*` syntax. More options further complicate the

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/2] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r ddecadabebdd4b301bd65534b58009e57ac1bbe5...55aecbedf3e10207eaef1d4c7913086a32e16b1e

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91293.diff 3 Files Affected: - (modified) clang-tools-extra/test/clang-tidy/check_clang_tidy.py (+11-2) - (added)

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91293.diff 3 Files Affected: - (modified) clang-tools-extra/test/clang-tidy/check_clang_tidy.py (+11-2) - (added)

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91293 None >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH] [clang-tidy] support expect no diagnosis test ---