1 // REQUIRES: libclang_include_clang_tools_extra 2 // RUN: c-index-test -test-load-source-reparse 2 all %s -Xclang -add-plugin -Xclang clang-tidy -Xclang -plugin-arg-clang-tidy -Xclang -checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s 3 4 class A { A(int i); }; 5 // CHECK: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit 6 7 // NOLINTNEXTLINE 8 class B { B(int i); }; 9 10 // NOLINTNEXTLINE(for-some-other-check) 11 class C { C(int i); }; 12 // CHECK: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit 13 14 // NOLINTNEXTLINE(*) 15 class C1 { C1(int i); }; 16 17 // NOLINTNEXTLINE(not-closed-bracket-is-treated-as-skip-all 18 class C2 { C2(int i); }; 19 20 // NOLINTNEXTLINE(google-explicit-constructor) 21 class C3 { C3(int i); }; 22 23 // NOLINTNEXTLINE(some-check, google-explicit-constructor) 24 class C4 { C4(int i); }; 25 26 // NOLINTNEXTLINE without-brackets-skip-all, another-check 27 class C5 { C5(int i); }; 28 29 30 // NOLINTNEXTLINE 31 32 class D { D(int i); }; 33 // CHECK: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit 34 35 // NOLINTNEXTLINE 36 // 37 class E { E(int i); }; 38 // CHECK: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit 39 40 #define MACRO(X) class X { X(int i); }; 41 MACRO(F) 42 // CHECK: :[[@LINE-1]]:7: warning: single-argument constructors must be marked explicit 43 // NOLINTNEXTLINE 44 MACRO(G) 45 46 #define MACRO_NOARG class H { H(int i); }; 47 // NOLINTNEXTLINE 48 MACRO_NOARG 49 50