[all-commits] [llvm/llvm-project] f6b205: [clangd] ExtractFunction: disable on regions that ...

Adam Czachorowski via All-commits all-commits at lists.llvm.org
Tue Dec 8 07:00:58 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f6b205dae16392382324fbca676ef6afe3920642
      https://github.com/llvm/llvm-project/commit/f6b205dae16392382324fbca676ef6afe3920642
  Author: Adam Czachorowski <adamcz at google.com>
  Date:   2020-12-08 (Tue, 08 Dec 2020)

  Changed paths:
    M clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
    M clang-tools-extra/clangd/unittests/TweakTests.cpp

  Log Message:
  -----------
  [clangd] ExtractFunction: disable on regions that sometimes, but not always return.

apply() will fail in those cases, so it's better to detect it in
prepare() already and hide code action from the user.

This was especially annoying on code bases that use a lot of
RETURN_IF_ERROR-like macros.

Differential Revision: https://reviews.llvm.org/D92408




More information about the All-commits mailing list