================
@@ -299,19 +367,73 @@ def check_notes(self, clang_tidy_output: str) -> None:
]
)
+ def check_header_messages(self, clang_tidy_output: str) -> str:
+ """
+ Filters and verifies clang-tidy diagnostics for headers.
+
+ - Input: The raw diagnostic output from clang-tidy.
+ - Output: The diagnostic output intended for the main file
+ verification.
+
+ This function separates messages belonging to headers specified by
+ `-check-header', verifies them using FileCheck against the header's
+ own rules, and returns the rest for further processing.
+ """
+ if not self.check_headers:
+ return clang_tidy_output
+
+ header_messages: Dict[str, List[str]] = {
----------------
EugeneZelenko wrote:
`defaultdict` should be used instead.
https://github.com/llvm/llvm-project/pull/175735
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits