[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 19 14:50:01 PDT 2020


nridge marked an inline comment as done.
nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:381
+  // to activate, are not retained by TokenBuffer).
+  for (syntax::Token T : syntax::spelledTokensTouching(Loc, AST.getTokens())) {
+    if (T.range(AST.getSourceManager()).touches(WordOffset + Word.size())) {
----------------
Whoops, meant to use `WordStart` rather than `Loc` here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76098





More information about the cfe-commits mailing list