[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 11 07:15:42 PDT 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Aside from some minor nits, LGTM!



================
Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:28
+    // Do not count decomposition declarations (C++17's structured bindings).
+    // Do not count variables declared in macros.
+    if (StructNesting == 0 &&
----------------
Comment is now stale.


================
Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:31
+        !(isa<ParmVarDecl>(VD) || isa<DecompositionDecl>(VD)))
+      Info.Variables++;
+    return true;
----------------
Do you mind switching these to preincrement (and predecrement, below) since the value is not subsequently used?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44602





More information about the cfe-commits mailing list