blob: 980e904cbbf2b2cf284c07d4e26e15e10e8fa99f [file] [log] [blame]
Alexander Kornienkodbefbdb2016-05-04 21:18:31 +00001// RUN: %check_clang_tidy %s google-explicit-constructor,clang-diagnostic-unused-variable %t -- -extra-arg=-Wunused-variable --
Alexander Kornienko31219d32014-02-28 00:27:50 +00002
3class A { A(int i); };
Alexander Kornienko5eb134c2015-11-28 02:25:02 +00004// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit
Alexander Kornienko31219d32014-02-28 00:27:50 +00005
6class B { B(int i); }; // NOLINT
Alexander Kornienko31219d32014-02-28 00:27:50 +00007
8class C { C(int i); }; // NOLINT(we-dont-care-about-categories-yet)
Alexander Kornienkodbefbdb2016-05-04 21:18:31 +00009
10void f() {
11 int i;
12// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: unused variable 'i' [clang-diagnostic-unused-variable]
13 int j; // NOLINT
14}
15
16// CHECK-MESSAGES: Suppressed 3 warnings (3 NOLINT)