[PATCH] D85310: [clangd] Disable define out-of-line code action on templates

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 09:07:30 PDT 2020


kadircet marked 2 inline comments as done.
kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:393
+    if (auto *PT = Source->getDescribedFunctionTemplate()) {
+      if (PT->getTemplatedDecl() == Source)
+        return false;
----------------
hokein wrote:
> is this inner `if` important? It seems that we could just return false.
yeah I was considering redeclarations, but they should be handled in the previous if anyways.


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