summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-07-15 13:11:49 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-07-15 13:11:49 +0000
commit2b584f3cab7ce5be6f7e6edad6ec81193505e5a5 (patch)
treef6f99a426172d11d859688d9b00aab43e9e4c454
parentfeff134142f06301224f05393c75aa4601cd06d5 (diff)
downloadbcm5719-llvm-2b584f3cab7ce5be6f7e6edad6ec81193505e5a5.tar.gz
bcm5719-llvm-2b584f3cab7ce5be6f7e6edad6ec81193505e5a5.zip
[clang-tidy] extend make_pair test for fixits in template definitions.
llvm-svn: 213068
-rw-r--r--clang-tools-extra/test/clang-tidy/google-explicit-make-pair.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/google-explicit-make-pair.cpp b/clang-tools-extra/test/clang-tidy/google-explicit-make-pair.cpp
index 257fd0621c7..4d7b209e6f5 100644
--- a/clang-tools-extra/test/clang-tidy/google-explicit-make-pair.cpp
+++ b/clang-tools-extra/test/clang-tidy/google-explicit-make-pair.cpp
@@ -16,6 +16,9 @@ pair<T1, T2> make_pair(T1 x, T2 y) {
template <typename T>
void templ(T a, T b) {
std::make_pair<T, unsigned>(a, b);
+ std::make_pair<int, int>(1, 2);
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: for C++11-compatibility, omit template arguments from make_pair
+// CHECK-FIXES: std::make_pair(1, 2)
}
void test(int i) {
@@ -39,6 +42,7 @@ M
// CHECK-FIXES-NEXT: M
templ(i, i);
+ templ(1U, 2U);
std::make_pair(i, 1); // no-warning
}
OpenPOWER on IntegriCloud