[all-commits] [llvm/llvm-project] 632491: [clangd] Simplify "preferred" vs "definition" logi...
Sam McCall via All-commits
all-commits at lists.llvm.org
Thu Mar 26 01:53:24 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6324912592a1ff8d672e55e02ca63f769decb154
https://github.com/llvm/llvm-project/commit/6324912592a1ff8d672e55e02ca63f769decb154
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2020-03-26 (Thu, 26 Mar 2020)
Changed paths:
M clang-tools-extra/clangd/XRefs.cpp
M clang-tools-extra/clangd/unittests/XRefsTests.cpp
Log Message:
-----------
[clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code.
Summary:
Now Preferred is always the canonical (first) decl, Definition is always the def
if available.
In practice the index was already forcing this behaviour anyway, so there's no
change. (Unless you weren't using this index, in which case this patch makes
textDocument/declaration and toggling work as expected).
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73369
More information about the All-commits
mailing list