[clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh
Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5989
llvm-svn: 220634
diff --git a/clang-tools-extra/test/clang-tidy/google-member-string-references.cpp b/clang-tools-extra/test/clang-tidy/google-member-string-references.cpp
index 1536bad..6ce05cb 100644
--- a/clang-tools-extra/test/clang-tidy/google-member-string-references.cpp
+++ b/clang-tools-extra/test/clang-tidy/google-member-string-references.cpp
@@ -1,4 +1,5 @@
-// RUN: clang-tidy %s -checks='-*,google-runtime-member-string-references' -- | FileCheck %s -implicit-check-not="{{warning|error}}:"
+// RUN: $(dirname %s)/check_clang_tidy.sh %s google-runtime-member-string-references %t
+// REQUIRES: shell
namespace std {
template<typename T>
@@ -12,7 +13,7 @@
struct A {
const std::string &s;
-// CHECK: :[[@LINE-1]]:3: warning: const string& members are dangerous. It is much better to use alternatives, such as pointers or simple constants.
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: const string& members are dangerous. It is much better to use alternatives, such as pointers or simple constants. [google-runtime-member-string-references]
};
struct B {
@@ -28,14 +29,14 @@
D();
const T &s;
const std::string &s2;
-// CHECK: :[[@LINE-1]]:3: warning: const string& members are dangerous. It is much better to use alternatives, such as pointers or simple constants.
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: const string& members are dangerous.
};
D<std::string> d;
struct AA {
const string &s;
-// CHECK: :[[@LINE-1]]:3: warning: const string& members are dangerous. It is much better to use alternatives, such as pointers or simple constants.
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: const string& members are dangerous.
};
struct BB {