[PATCH] [clang-tidy] Add a checker that removes deducible arguments from std::make_pair
Benjamin Kramer
benny.kra at gmail.com
Tue Jul 15 06:03:57 PDT 2014
================
Comment at: clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp:18
@@ +17,3 @@
+void templ(T a, T b) {
+ std::make_pair<T, unsigned>(a, b);
+}
----------------
Alexander Kornienko wrote:
> I assume the check should suggest replacements in cases where there are no dependent types, but could you add a test? And one more instantiation, so that we actually test a case where something can go wrong due to templates.
We completely ignore code in template instantiations at the moment. It would be nice to check for code in templates that does not contain any dependencies on the template arguments but it's not tricky to match (or do we have an ASTMatcher for it?)
http://reviews.llvm.org/D4497
More information about the cfe-commits
mailing list