[PATCH] D92408: [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

Utkarsh Saxena via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 00:49:37 PST 2020


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:724
+  ReturnStmtVisitor V;
+  for (const auto *RootStmt : ExtZone.RootStmts) {
+    V.TraverseStmt(const_cast<Stmt *>(RootStmt));
----------------
nit: s/auto/Stmt



================
Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:613
+  EXPECT_THAT(
+      apply("#define RETURN_IF_ERROR(x) if (x) return\nRETU^RN_IF_ERROR(4);"),
+      StartsWith("unavailable"));
----------------
usaxena95 wrote:
> super super nit: `!x` instead of x.
Oops this is fine. Ignore this comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92408



More information about the cfe-commits mailing list