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

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 7 16:40:21 PST 2016


alexfh 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
----------------
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:`.


https://reviews.llvm.org/D26218





More information about the cfe-commits mailing list