[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-13 Thread pre-merge checks [bot] via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-13 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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/

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-13 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-13 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread pre-merge checks [bot] via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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:

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread pre-merge checks [bot] via Phabricator via cfe-commits
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

[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

2020-01-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
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