[PATCH] D24652: [clang-tidy] readability-avoid-const-params-in-decls template instantiation bugfix
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 06:59:17 PDT 2016
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/readability/AvoidConstParamsInDecls.cpp:39
@@ -38,2 +38,3 @@
// generate a non-definition FunctionDecl too. Ignore those.
- unless(cxxMethodDecl(ofClass(cxxRecordDecl(isLambda())))),
+ // Ignore template instantiations too.
+ unless(cxxMethodDecl(ofClass(cxxRecordDecl(anyOf(
----------------
alexfh wrote:
> Would be helpful to expand on why we're ignoring only member function of class instantiations (and not instantiations of member or free standing functions, for example).
AFAICT, template instantiations of member and free standing functions are definitions when the template is a definition.
https://reviews.llvm.org/D24652
More information about the cfe-commits
mailing list