blob: 80b215d82b83a1bb1cce516573379220f437c5c8 [file] [log] [blame]
Daniel Jasperd07c8402013-07-29 08:19:24 +00001// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
Benjamin Kramerfb98b742014-09-04 10:31:23 +00002// RUN: clang-tidy %t.cpp -checks='-*,google-explicit-constructor,llvm-namespace-comment' -fix -export-fixes=%t.yaml -- > %t.msg 2>&1
Daniel Jasperd07c8402013-07-29 08:19:24 +00003// RUN: FileCheck -input-file=%t.cpp %s
Alexander Kornienko38d81b42014-03-27 10:24:11 +00004// RUN: FileCheck -input-file=%t.msg -check-prefix=CHECK-MESSAGES %s
Benjamin Kramerfb98b742014-09-04 10:31:23 +00005// RUN: FileCheck -input-file=%t.yaml -check-prefix=CHECK-YAML %s
Daniel Jasperd07c8402013-07-29 08:19:24 +00006
7namespace i {
8}
9// CHECK: } // namespace i
Alexander Kornienko38d81b42014-03-27 10:24:11 +000010// CHECK-MESSAGES: note: FIX-IT applied suggested code changes
Benjamin Kramerfb98b742014-09-04 10:31:23 +000011// CHECK-YAML: ReplacementText: ' // namespace i'
Daniel Jasperd07c8402013-07-29 08:19:24 +000012
13class A { A(int i); };
14// CHECK: class A { explicit A(int i); };
Alexander Kornienko38d81b42014-03-27 10:24:11 +000015// CHECK-MESSAGES: note: FIX-IT applied suggested code changes
16// CHECK-MESSAGES: clang-tidy applied 2 of 2 suggested fixes.
Benjamin Kramerfb98b742014-09-04 10:31:23 +000017// CHECK-YAML: ReplacementText: 'explicit '