19 lines · cpp
1// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp2// RUN: clang-tidy %t.cpp -checks='-*,google-explicit-constructor,llvm-namespace-comment' -fix -export-fixes=%t.yaml -- > %t.msg 2>&13// RUN: FileCheck -input-file=%t.cpp %s4// RUN: FileCheck -input-file=%t.msg -check-prefix=CHECK-MESSAGES %s5// RUN: FileCheck -input-file=%t.yaml -check-prefix=CHECK-YAML %s6 7namespace i {8void f(); // So that the namespace isn't empty.9}10// CHECK: } // namespace i11// CHECK-MESSAGES: note: FIX-IT applied suggested code changes12// CHECK-YAML: ReplacementText: ' // namespace i'13 14class A { A(int i); };15// CHECK: class A { explicit A(int i); };16// CHECK-MESSAGES: note: FIX-IT applied suggested code changes17// CHECK-MESSAGES: clang-tidy applied 2 of 2 suggested fixes.18// CHECK-YAML: ReplacementText: 'explicit '19