1// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,google-readability-casting' 2>&1 | FileCheck %s
2
3// NOLINTBEGIN(google-explicit-constructor,google-readability-casting)
4class B { B(int i); };
5// NOLINTEND(google-explicit-constructor)
6auto Num2 = (unsigned int)(-1);
7// NOLINTEND(google-readability-casting)
8
9// Note: the expected output has been split over several lines so that clang-tidy
10// does not see the "no lint" suppression comment and mistakenly assume it
11// is meant for itself.
12// CHECK: :[[@LINE-9]]:4: error: unmatched 'NOLIN
13// CHECK: TBEGIN' comment without a subsequent 'NOLIN
14// CHECK: TEND' comment [clang-tidy-nolint]
15// CHECK: :[[@LINE-11]]:11: warning: single-argument constructors must be marked explicit
16// CHECK: :[[@LINE-11]]:4: error: unmatched 'NOLIN
17// CHECK: TEND' comment without a previous 'NOLIN
18// CHECK: TBEGIN' comment [clang-tidy-nolint]
19// CHECK: :[[@LINE-13]]:13: warning: C-style casts are discouraged; use static_cast
20// CHECK: :[[@LINE-13]]:4: error: unmatched 'NOLIN
21// CHECK: TEND' comment without a previous 'NOLIN
22// CHECK: TBEGIN' comment [clang-tidy-nolint]
23

source code of clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp