[PATCH] D26218: [clang-tidy] Ignore notes along with a warning when processing NOLINT

Nikita Kakuev via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 9 10:59:19 PST 2016


nkakuev marked an inline comment as done.
nkakuev added inline comments.


================
Comment at: test/clang-tidy/nolint.cpp:36
+}
+// CHECK-NOT: trigger_warning.h:{{.*}} warning: The left operand of '>' is a garbage value
+// CHECK-NOT: :[[@LINE-4]]:{{.*}} note
----------------
alexfh wrote:
> The test is too brittle: if the functionality breaks after the text of the message changes, it will still pass.
> 
> Two ways to deal with it:
> 1. add a positive test to ensure this pattern actually triggers a warning
> 2. make the CHECK-NOT pattern broader: `// CHECK-NOT: warning:`.
Fixed in review D26466.


https://reviews.llvm.org/D26218





More information about the cfe-commits mailing list