[clang-tools-extra] r213068 - [clang-tidy] extend make_pair test for fixits in template definitions.

Benjamin Kramer benny.kra at googlemail.com
Tue Jul 15 06:11:49 PDT 2014


Author: d0k
Date: Tue Jul 15 08:11:49 2014
New Revision: 213068

URL: http://llvm.org/viewvc/llvm-project?rev=213068&view=rev
Log:
[clang-tidy] extend make_pair test for fixits in template definitions.

Modified:
    clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp

Modified: clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp?rev=213068&r1=213067&r2=213068&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp Tue Jul 15 08:11:49 2014
@@ -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
 }





More information about the cfe-commits mailing list