================
@@ -0,0 +1,5 @@
+// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \
+// RUN:   -- -- -isystem %S/Inputs/avoid-pragma-once
+
+#include <lib.h>
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. 
[portability-avoid-pragma-once]
----------------
dl8sd11 wrote:

I'm new to writing tests for header files. I got the following error. Is there 
a suggestion for this? Thanks!

```
Input was:
<<<<<<
           1: 1 warning generated.
check:5'0     X~~~~~~~~~~~~~~~~~~~~ error: no match found
check:5'1                           with "@LINE-1" equal to "4"
           2: Suppressed 1 warnings (1 in non-user code).
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:5'2              ?                                   possible intended 
match
           3: Use -header-filter=.* to display errors from all non-system 
headers. Use -system-headers to display errors from system headers as well.
check:5'0     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
```

https://github.com/llvm/llvm-project/pull/140388
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to