[PATCH] D85310: [clangd] Disable define out-of-line code action on templates
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 5 07:57:13 PDT 2020
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:125
"Couldn't get range for function.");
// Include template parameter list.
if (auto *FTD = FD->getDescribedFunctionTemplate())
----------------
since we don't support template functions, I think this code can be removed.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:393
+ if (auto *PT = Source->getDescribedFunctionTemplate()) {
+ if (PT->getTemplatedDecl() == Source)
+ return false;
----------------
is this inner `if` important? It seems that we could just return false.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85310/new/
https://reviews.llvm.org/D85310
More information about the cfe-commits
mailing list