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

UTKARSH SAXENA via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 01:57:59 PST 2020


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 comment is copied over, but it doesn't reflect what's going on.
> 
> as this check makes sure we prever results from AST rather than index for main file, not the duplicate handling(which actually de-dups references on the *same* location).
> 
> since this is handled in the common code path, it is OK to check only in one of the tests(up to you though). but please update the comments.
Updated the old comment to show the correct intent.
Also removed the check from the macros test since this was on the common code path.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72395/new/

https://reviews.llvm.org/D72395





More information about the cfe-commits mailing list