[PATCH] D52871: [clangd] Use canonical declarations in ReferenceFinder.

2018-10-04 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343763: [clangd] Use canonical declarations in ReferenceFinder. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52871 Files:

[PATCH] D52871: [clangd] Use canonical declarations in ReferenceFinder.

2018-10-04 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343763: [clangd] Use canonical declarations in ReferenceFinder. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D52871?vs=168248&id=168250#toc Repository: rL

[PATCH] D52871: [clangd] Use canonical declarations in ReferenceFinder.

2018-10-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 168248. hokein marked an inline comment as done. hokein added a comment. Remove unnecessary labels. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52871 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: unittests/clangd/XRe

[PATCH] D52871: [clangd] Use canonical declarations in ReferenceFinder.

2018-10-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice catch! Comment at: unittests/clangd/XRefsTests.cpp:1185 std::vector> ExpectedLocations; for (const auto &R : T.ranges("foo")) ExpectedLocations.pu

[PATCH] D52871: [clangd] Use canonical declarations in ReferenceFinder.

2018-10-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. handleDeclOccurrencce reports a canonical declartion, so stick to use canonical declarations to determine whether a declaration is in the target