[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.
Kim Gräsman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 23 12:24:52 PDT 2018
kimgr added subscribers: lebedev.ri, kimgr.
kimgr added a comment.
I have to say I disagree that either the nested struct/function or macros
(in any form) should count toward a function's total variable count.
Both are valid forms of abstraction, and they both remove complexity from
the containing function since they factor details *out of the function's
immediate lexical contents* (I avoid 'scope' as macros do pollute the
scope) in a way that improves readability.
There are cases where macros can make things more complex but it seems
unfair to flag variables declared by macros as making expanding functions
more complex.
In short, I think I agree with Aaron's last example classifications.
- Kim
Den tors 22 mars 2018 14:56Eugene Zelenko via Phabricator via cfe-commits <
cfe-commits at lists.llvm.org> skrev:
> Eugene.Zelenko added inline comments.
>
> ================
> Comment at: docs/ReleaseNotes.rst:127
>
> +- Added `VariableThreshold` option to `readability-function-size
> + <
> http://clang.llvm.org/extra/clang-tidy/checks/readability-function-size.html>`_
> check
>
> ----------------
>
> Please rebase from trunk and use //:doc:// for link.
>
> Repository:
>
> rCTE Clang Tools Extra
>
> https://reviews.llvm.org/D44602
>
> _______________________________________________
>
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44602
More information about the cfe-commits
mailing list