[PATCH] D92053: [clangd] Addusing tweak: find insertion point after definition

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 13:56:36 PST 2020


adamcz added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:201
+  for (const auto &TLD : TLDs) {
+    if (MustInsertAfterLoc.isValid() &&
+        SM.isBeforeInTranslationUnit(TLD->getBeginLoc(), MustInsertAfterLoc))
----------------
kadircet wrote:
> nit: maybe factor this into a lambda `bool IsUsingValidAt(SourceLocation)` ?
Good idea. Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92053



More information about the cfe-commits mailing list