[PATCH] D21303: [clang-tidy] Adds performance-returning-type check.
Marek SokoĊowski via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 02:11:41 PDT 2016
mnbvmar added inline comments.
================
Comment at: clang-tidy/performance/ReturningTypeCheck.cpp:69
@@ +68,3 @@
+AST_MATCHER_FUNCTION(ast_matchers::internal::Matcher<FunctionDecl>,
+ haveOneActiveArgument) {
+ return anyOf(parameterCountIs(1),
----------------
Probably hasOneActiveArgument.
================
Comment at: clang-tidy/performance/ReturningTypeCheck.cpp:72
@@ +71,3 @@
+ allOf(unless(parameterCountIs(0)),
+ hasParameter(2, hasDefaultArgument())));
+}
----------------
In hasParameter(N, ...), argument id is 0-based. Did you mean to match the third parameter (1-based)?
Repository:
rL LLVM
http://reviews.llvm.org/D21303
More information about the cfe-commits
mailing list