This patch disable extraction of the body of the enclosing function.
void f() [[{}]]
Extracting this CompoundStmt would leave the enclosing function without
a body.
Paths
| Differential D68245
[Clangd] ExtractFunction: Don't extract body of enclosing function. ClosedPublic Authored by SureYeaah on Sep 30 2019, 3:05 PM.
Details Summary This patch disable extraction of the body of the enclosing function. Extracting this CompoundStmt would leave the enclosing function without
Diff Detail
Event TimelineComment Actions LGTM, thanks
This revision is now accepted and ready to land.Oct 1 2019, 2:35 AM Closed by commit rL373472: [Clangd] ExtractFunction: Don't extract body of enclosing function. (authored by SureYeaah). · Explain WhyOct 2 2019, 6:51 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 222815 clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
clang-tools-extra/clangd/unittests/TweakTests.cpp
|
I believe it is not possible to have an EnclosingFunc without a body at this point. Let's make it an assertion instead.