[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 06:55:43 PDT 2017


lebedev.ri added inline comments.


================
Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:38
+    } else {
+      assert(!isa<CompoundStmt>(Node));
+      if (TrackedParent.back())
----------------
malcolm.parsons wrote:
> I don't think this assert adds anything.
Yes, however the original `if` did have that check.
I **think**, having an assert here may help to not break this in the future.


Repository:
  rL LLVM

https://reviews.llvm.org/D34202





More information about the cfe-commits mailing list