summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/nolint.cpp
blob: 980e904cbbf2b2cf284c07d4e26e15e10e8fa99f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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

class B { B(int i); }; // NOLINT

class C { C(int i); }; // NOLINT(we-dont-care-about-categories-yet)

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