merge_guards_bot added a comment.
{icon check-circle color=green} Unit tests: pass. 61641 tests passed, 0 failed
and 777 were skipped.
{icon check-circle color=green} clang-tidy: pass.
{icon check-circle color=green} clang-format: pass.
Build artifacts
This revision was automatically updated to reflect the committed changes.
Closed by commit rG734aa1d133f2: [clangd] Publish xref for macros from Index
and AST. (authored by usaxena95).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72395/new/
usaxena95 added inline comments.
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1093
+
+ // If the main file is in the index, we don't return duplicates.
+ // (even if the references are in a different location)
kadircet wrote:
> i know the
usaxena95 updated this revision to Diff 237596.
usaxena95 marked 3 inline comments as done.
usaxena95 added a comment.
Removed repeated check from the test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72395/new/
https://reviews.llvm.org/D72395
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, LGTM!
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1093
+
+ // If the main file is in the index, we don't return duplicates.
+ // (even if the
merge_guards_bot added a comment.
{icon check-circle color=green} Unit tests: pass. 61307 tests passed, 0 failed
and 736 were skipped.
{icon check-circle color=green} clang-tidy: pass.
{icon check-circle color=green} clang-format: pass.
Build artifacts
usaxena95 marked 2 inline comments as done.
usaxena95 added inline comments.
Comment at: clang-tools-extra/clangd/XRefs.cpp:463
+ }
+ // Query the index for references from other files.
+ if (Index && Results.References.size() < Limit) {
kadircet
usaxena95 updated this revision to Diff 236829.
usaxena95 marked 3 inline comments as done.
usaxena95 added a comment.
Addressed comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72395/new/
https://reviews.llvm.org/D72395
Files:
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1021
TEST(FindReferences, NeedsIndex) {
+ const char *Header = (R"cpp(
nit: i don't think there's much benefit in combining refs for macros and
symbols in a single
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/XRefs.cpp:463
+ }
+ // Query the index for references from other files.
+ if (Index && Results.References.size() < Limit) {
could we merge this and the code for decls by only
merge_guards_bot added a comment.
{icon check-circle color=green} Unit tests: pass. 61306 tests passed, 0 failed
and 736 were skipped.
{icon check-circle color=green} clang-tidy: pass.
{icon times-circle color=red} clang-format: fail. Please format your changes
with clang-format by running
usaxena95 created this revision.
usaxena95 added a reviewer: kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay,
ilya-biryukov.
Herald added a project: clang.
With this patch the `findReferences` API will return Xref for macros.
If the symbol under the cursor is a macro
12 matches
Mail list logo