[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
Sat Dec 5 04:29:46 PST 2020
usaxena95 accepted this revision.
usaxena95 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:711
+// Returns true if ExtZone contains any ReturnStms.
+bool hasReturnStmt(const ExtractionZone &ExtZone) {
----------------
s/ReturnStms/ReturnStmts
================
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"));
----------------
super super nit: `!x` instead of x.
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