[PATCH] D45717: [clangd] Using index for GoToDefinition.
    Haojian Wu via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Apr 23 02:16:34 PDT 2018
    
    
  
hokein added a comment.
I have updated the patch according to offline discussion -- for each symbol, we will return both decl and def locations (if available, def first) as they seems to be most sensible to users. We always prefer location from AST over Index when conflicts.
================
Comment at: clangd/XRefs.cpp:261
+
+  for (auto It : ResultCandidates)
+    Result.push_back(It.second);
----------------
sammccall wrote:
> Here we're returning exactly one candidate per symbol we identified as a candidate. There are other choices - why this one?
Yeah, this was one **definition** location per  symbol, made a change according to our discussion.
Repository:
  rCTE Clang Tools Extra
https://reviews.llvm.org/D45717
    
    
More information about the cfe-commits
mailing list