17 lines · cpp
1// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s2 3// NOLINTBEGIN(google-explicit-constructor)4class A { A(int i); };5// NOLINTEND(*)6 7// Note: the expected output has been split over several lines so that clang-tidy8// does not see the "no lint" suppression comment and mistakenly assume it9// is meant for itself.10// CHECK: :[[@LINE-7]]:4: error: unmatched 'NOLIN11// CHECK: TBEGIN' comment without a subsequent 'NOLIN12// CHECK: TEND' comment [clang-tidy-nolint]13// CHECK: :[[@LINE-9]]:11: warning: single-argument constructors must be marked explicit14// CHECK: :[[@LINE-9]]:4: error: unmatched 'NOLIN15// CHECK: TEND' comment without a previous 'NOLIN16// CHECK: TBEGIN' comment [clang-tidy-nolint]17