brintos

brintos / llvm-project-archived public Read only

0
0
Text · 920 B · ee5b1cc Raw
20 lines · cpp
1// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,google-readability-casting' 2>&1 | FileCheck %s2 3// NOLINTBEGIN(google-explicit-constructor)4// NOLINTBEGIN(google-readability-casting)5class A { A(int i); };6auto Num = (unsigned int)(-1);7// NOLINTEND(google-explicit-constructor)8// NOLINTEND(google-readability-casting)9 10// Note: the expected output has been split over several lines so that clang-tidy11//       does not see the "no lint" suppression comment and mistakenly assume it12//       is meant for itself.13// CHECK: :[[@LINE-10]]:4: error: unmatched 'NOLIN14// CHECK: TBEGIN' comment without a subsequent 'NOLIN15// CHECK: TEND' comment [clang-tidy-nolint]16// CHECK: :[[@LINE-11]]:11: warning: single-argument constructors must be marked explicit17// CHECK: :[[@LINE-10]]:4: error: unmatched 'NOLIN18// CHECK: TEND' comment without a previous 'NOLIN19// CHECK: TBEGIN' comment [clang-tidy-nolint]20