Issue 133515
Summary check_clang_tidy/FileCheck is not enforcing CHECK-MESSAGES in header files
Labels new issue
Assignees
Reporter carlosgalvezp
    When trying to create a unit test for [this issue](https://github.com/llvm/llvm-project/issues/118009), I realized that check_clang_tidy / FileCheck 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?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to