[PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.
Samuel Benzaquen via cfe-commits
cfe-commits at lists.llvm.org
Tue May 31 08:18:12 PDT 2016
sbenza added inline comments.
================
Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:34
@@ -29,1 +33,3 @@
+template <typename S> bool isSetDifferenceEmpty(const S &S1, const S &S2) {
+ for (const auto &E : S1)
----------------
isSubset?
================
Comment at: clang-tidy/utils/Matchers.cpp:16
@@ +15,3 @@
+
+ast_matchers::TypeMatcher isConstReference() {
+ return ast_matchers::referenceType(ast_matchers::pointee(
----------------
Prefer AST_MATCHER_FUNCTION.
That macro will make sure to use a singleton matcher instead, since it has no arguments.
================
Comment at: clang-tidy/utils/Matchers.h:44
@@ +43,3 @@
+// Returns QualType matcher for references to const.
+ast_matchers::TypeMatcher isConstReference();
+
----------------
isReferenceToConst
http://reviews.llvm.org/D20277
More information about the cfe-commits
mailing list