summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/nolint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/nolint.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/nolint.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang-tools-extra/test/clang-tidy/nolint.cpp b/clang-tools-extra/test/clang-tidy/nolint.cpp
index 9e00839e1ca..980e904cbbf 100644
--- a/clang-tools-extra/test/clang-tidy/nolint.cpp
+++ b/clang-tools-extra/test/clang-tidy/nolint.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s google-explicit-constructor %t
+// RUN: %check_clang_tidy %s google-explicit-constructor,clang-diagnostic-unused-variable %t -- -extra-arg=-Wunused-variable --
class A { A(int i); };
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit
@@ -6,4 +6,11 @@ class A { A(int i); };
class B { B(int i); }; // NOLINT
class C { C(int i); }; // NOLINT(we-dont-care-about-categories-yet)
-// CHECK-MESSAGES: Suppressed 2 warnings (2 NOLINT)
+
+void f() {
+ int i;
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: unused variable 'i' [clang-diagnostic-unused-variable]
+ int j; // NOLINT
+}
+
+// CHECK-MESSAGES: Suppressed 3 warnings (3 NOLINT)
OpenPOWER on IntegriCloud