1// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
2// RUN: not clang-tidy %t.cpp -checks='-*,google-explicit-constructor' -fix -- > %t.msg 2>&1
3// RUN: FileCheck -input-file=%t.cpp -check-prefix=CHECK-FIX %s
4// RUN: FileCheck -input-file=%t.msg -check-prefix=CHECK-MESSAGES %s
5// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
6// RUN: clang-tidy %t.cpp -checks='-*,google-explicit-constructor' -fix-errors -- > %t.msg 2>&1
7// RUN: FileCheck -input-file=%t.cpp -check-prefix=CHECK-FIX2 %s
8// RUN: FileCheck -input-file=%t.msg -check-prefix=CHECK-MESSAGES2 %s
9
10class A { A(int i); }
11// CHECK-FIX: class A { A(int i); }{{$}}
12// CHECK-MESSAGES: Fixes have NOT been applied.
13// CHECK-FIX2: class A { explicit A(int i); };
14// CHECK-MESSAGES2: note: FIX-IT applied suggested code changes
15// CHECK-MESSAGES2: clang-tidy applied 2 of 2 suggested fixes.
16

source code of clang-tools-extra/test/clang-tidy/infrastructure/fix-errors.cpp