[PATCH] D76432: [clangd] Add a tweak for adding "using" statement.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 16:32:48 PDT 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:245
+  auto &SM = Inputs.AST->getSourceManager();
+  auto TB = Inputs.AST->getTokens();
+  // Determine the length of the qualifier under the cursor, then remove it.
----------------
sammccall wrote:
> yikes, this copies the tokenbuffer, I didn't think that was even possible!
> auto&
Copy constructor deleted in 94938d7d41cd11c4539ff93b801fe53cb4fddba2


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76432/new/

https://reviews.llvm.org/D76432





More information about the cfe-commits mailing list