Open
Description
When trying to create a unit test for this issue, I realized that check_clang_tidy is currently not handling the CHECK-MESSAGES lines from header files.
This can be reproduced with the following change:
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
@@ -6,7 +6,7 @@ extern int g;
extern int h;
#include "duplicate-include2.h"
extern int i;
-// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: duplicate include
+// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: foo include
After that change, run ninja check-clang-tools
again. Result: all the tests continue to pass. I expect this test to fail since now the message is different.
Is this expected? How can we fix this?