[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 06:55:06 PDT 2019
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:233
+bool fillTemplateParameterMapping(
+ const FunctionDecl *Dest, const FunctionDecl *Source,
+ llvm::DenseMap<const Decl *, std::string> &ParamToNewName) {
----------------
NIT: instead of returning whether `Dest` is a template, we could instead:
1. accept a `TemplateDecl* Dest` and `TemplateDecl *Source`,
2. check whether functions are template at the call site and only call `fillTemplateParameterMapping` when they're template.
I believe that would make both functions simpler and more straight-forward. But up to you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68937/new/
https://reviews.llvm.org/D68937
More information about the cfe-commits
mailing list