aaron.ballman added inline comments.
================ Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:96 - // Do not trigger on non-const value parameters when: - // 1. they are in a constructor definition since they can likely trigger - // modernize-pass-by-value which will suggest to move the argument. - if (!IsConstQualified && (llvm::isa<CXXConstructorDecl>(Function) || - !Function->doesThisDeclarationHaveABody())) - return; + const FunctionDecl &Definition = *Function->getDefinition(); ---------------- Instead of using `hasBody()` and `getDefinition()`, you should use `FunctionDecl::getBody()` and pass in an argument to receive the function's definition. https://reviews.llvm.org/D28022 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits