[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 20 10:28:29 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/UseEarlyExitsCheck.cpp:217
+      LineCountThreshold(Options.get("LineCountThreshold", 10U)),
+      WrapInBraces(Options.get("WrapInBraces", false)) {}
+
----------------
I have an idea that we could infer this using the `readability-braces-around-statements` and its hicpp alias.
If enabled, probe the ShortStatementLines option to infer whether or not that check would fire if we make this transformation without using braces.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130181/new/

https://reviews.llvm.org/D130181



More information about the cfe-commits mailing list