[clang-tidy] google-explicit-constructor: improve the warning message

Also switch some more tests to %check_clang_tidy.

llvm-svn: 254216
diff --git a/clang-tools-extra/test/clang-tidy/deduplication.cpp b/clang-tools-extra/test/clang-tidy/deduplication.cpp
index 8a912fa..056fe4e 100644
--- a/clang-tools-extra/test/clang-tidy/deduplication.cpp
+++ b/clang-tools-extra/test/clang-tidy/deduplication.cpp
@@ -1,10 +1,8 @@
-// RUN: clang-tidy -checks='-*,google-explicit-constructor' %s -- | FileCheck %s
+// RUN: %check_clang_tidy %s google-explicit-constructor %t
 
 template<typename T>
 struct A { A(T); };
-// CHECK: :[[@LINE-1]]:12: warning: single-argument constructors must be explicit [google-explicit-constructor]
-// CHECK-NOT: warning:
-
+// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: single-argument constructors must be marked explicit
 
 void f() {
   A<int> a(0);
diff --git a/clang-tools-extra/test/clang-tidy/diagnostic.cpp b/clang-tools-extra/test/clang-tidy/diagnostic.cpp
index 063004a..9d2fb5c 100644
--- a/clang-tools-extra/test/clang-tidy/diagnostic.cpp
+++ b/clang-tools-extra/test/clang-tidy/diagnostic.cpp
@@ -11,8 +11,8 @@
 // CHECK3: :[[@LINE+1]]:9: warning: implicit conversion from 'double' to 'int' changes value
 int a = 1.5;
 
-// CHECK2: :[[@LINE+2]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
-// CHECK3: :[[@LINE+1]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
+// CHECK2: :[[@LINE+2]]:11: warning: single-argument constructors must be marked explicit
+// CHECK3: :[[@LINE+1]]:11: warning: single-argument constructors must be marked explicit
 class A { A(int) {} };
 
 #define MACRO_FROM_COMMAND_LINE
diff --git a/clang-tools-extra/test/clang-tidy/file-filter.cpp b/clang-tools-extra/test/clang-tidy/file-filter.cpp
index 0c9f3a2..1f52513 100644
--- a/clang-tools-extra/test/clang-tidy/file-filter.cpp
+++ b/clang-tools-extra/test/clang-tidy/file-filter.cpp
@@ -8,7 +8,7 @@
 
 #include "header1.h"
 // CHECK-NOT: warning:
-// CHECK2: header1.h:1:12: warning: single-argument constructors must be explicit [google-explicit-constructor]
+// CHECK2: header1.h:1:12: warning: single-argument constructors must be marked explicit
 // CHECK3-NOT: warning:
 // CHECK4: header1.h:1:12: warning: single-argument constructors
 
diff --git a/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp b/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp
index 02a1600..b49ce7b 100644
--- a/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp
+++ b/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp
@@ -44,11 +44,11 @@
   // CHECK-FIXES: {{^  }}A(const A& a) {}
 
   A(int x1) {}
-  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: single-argument constructors must be explicit [google-explicit-constructor]
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor]
   // CHECK-FIXES: {{^  }}explicit A(int x1) {}
 
   A(double x2, double y = 3.14) {}
-  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructors that are callable with a single argument must be marked explicit [google-explicit-constructor]
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor]
   // CHECK-FIXES: {{^  }}explicit A(double x2, double y = 3.14) {}
 
   template <typename... T>
diff --git a/clang-tools-extra/test/clang-tidy/line-filter.cpp b/clang-tools-extra/test/clang-tidy/line-filter.cpp
index a6a1885..ad980cf 100644
--- a/clang-tools-extra/test/clang-tidy/line-filter.cpp
+++ b/clang-tools-extra/test/clang-tidy/line-filter.cpp
@@ -2,7 +2,7 @@
 
 #include "header1.h"
 // CHECK-NOT: header1.h:{{.*}} warning
-// CHECK: header1.h:1:12: warning: single-argument constructors must be explicit [google-explicit-constructor]
+// CHECK: header1.h:1:12: warning: single-argument constructors must be marked explicit
 // CHECK: header1.h:2:12: warning: single-argument constructors {{.*}}
 // CHECK-NOT: header1.h:{{.*}} warning
 
diff --git a/clang-tools-extra/test/clang-tidy/macros.cpp b/clang-tools-extra/test/clang-tidy/macros.cpp
index 91e38ac..fa4f32a 100644
--- a/clang-tools-extra/test/clang-tidy/macros.cpp
+++ b/clang-tools-extra/test/clang-tidy/macros.cpp
@@ -3,5 +3,5 @@
 #define Q(name) class name { name(int i); }
 
 Q(A);
-// CHECK: :[[@LINE-1]]:3: warning: single-argument constructors must be explicit [google-explicit-constructor]
+// CHECK: :[[@LINE-1]]:3: warning: single-argument constructors must be marked explicit
 // CHECK: :3:30: note: expanded from macro 'Q'
diff --git a/clang-tools-extra/test/clang-tidy/nolint.cpp b/clang-tools-extra/test/clang-tidy/nolint.cpp
index 05d05b8..9e00839 100644
--- a/clang-tools-extra/test/clang-tidy/nolint.cpp
+++ b/clang-tools-extra/test/clang-tidy/nolint.cpp
@@ -1,11 +1,9 @@
-// RUN: clang-tidy -checks='-*,google-explicit-constructor' %s -- 2>&1 | FileCheck %s
+// RUN: %check_clang_tidy %s google-explicit-constructor %t
 
 class A { A(int i); };
-// CHECK: :[[@LINE-1]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
+// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit
 
 class B { B(int i); }; // NOLINT
-// CHECK-NOT: :[[@LINE-1]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
 
 class C { C(int i); }; // NOLINT(we-dont-care-about-categories-yet)
-// CHECK-NOT: :[[@LINE-1]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
-// CHECK: Suppressed 2 warnings (2 NOLINT)
+// CHECK-MESSAGES: Suppressed 2 warnings (2 NOLINT)