2013-07-29 16:19:24 +08:00
|
|
|
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
|
2014-09-04 18:31:23 +08:00
|
|
|
// RUN: clang-tidy %t.cpp -checks='-*,google-explicit-constructor,llvm-namespace-comment' -fix -export-fixes=%t.yaml -- > %t.msg 2>&1
|
2013-07-29 16:19:24 +08:00
|
|
|
// RUN: FileCheck -input-file=%t.cpp %s
|
2014-03-27 18:24:11 +08:00
|
|
|
// RUN: FileCheck -input-file=%t.msg -check-prefix=CHECK-MESSAGES %s
|
2014-09-04 18:31:23 +08:00
|
|
|
// RUN: FileCheck -input-file=%t.yaml -check-prefix=CHECK-YAML %s
|
2013-07-29 16:19:24 +08:00
|
|
|
|
|
|
|
namespace i {
|
2016-10-18 01:25:02 +08:00
|
|
|
void f(); // So that the namespace isn't empty.
|
2013-07-29 16:19:24 +08:00
|
|
|
}
|
|
|
|
// CHECK: } // namespace i
|
2014-03-27 18:24:11 +08:00
|
|
|
// CHECK-MESSAGES: note: FIX-IT applied suggested code changes
|
2014-09-04 18:31:23 +08:00
|
|
|
// CHECK-YAML: ReplacementText: ' // namespace i'
|
2013-07-29 16:19:24 +08:00
|
|
|
|
|
|
|
class A { A(int i); };
|
|
|
|
// CHECK: class A { explicit A(int i); };
|
2014-03-27 18:24:11 +08:00
|
|
|
// CHECK-MESSAGES: note: FIX-IT applied suggested code changes
|
|
|
|
// CHECK-MESSAGES: clang-tidy applied 2 of 2 suggested fixes.
|
2014-09-04 18:31:23 +08:00
|
|
|
// CHECK-YAML: ReplacementText: 'explicit '
|