[PATCH] D151294: [clangd] Remove inline Specifier for DefineOutline Tweak
Brian Gluzman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 22:58:41 PDT 2023
bgluzman added inline comments.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:136
+// Removes matching instances of given token preceeding the function defition.
+llvm::Expected<tooling::Replacements>
+getDelKeywordReplacements(const FunctionDecl *FD,
----------------
This was extracted from the `DelKeyword` lambda in `getFunctionSourceCode` since it now is used within `apply` as well.
Note that since this returns a `tooling::Replacements`, the caller must combine the result with other `Replacement`s via `tooling::Replacements::merge`. This is my first time contributing to this project, so please let me know if using `merge` (instead of `add`) could cause performance issues. I can change this so that we `add` to a `tooling::Replacements` out-parameter, instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151294/new/
https://reviews.llvm.org/D151294
More information about the cfe-commits
mailing list