[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 7 05:42:01 PST 2018


hokein added a comment.

> What are the cases we're trying to filter out? Only implicit constructor or anything else?

I think implicit constructor is the only case we care about. We also looked through the caller implementation of `handleDeclOccurence`, it is safe to assume it.



================
Comment at: unittests/clangd/XRefsTests.cpp:1228
 
+TEST(FindReferences, ExplicitSymbols) {
+  const char *Tests[] = {
----------------
ilya-biryukov wrote:
> I'm missing what does this test actually tests.
> The absence of implicit references (I guess constructor expressions)?
This test tests the cases where symbol is being marked implicit incorrectly, which will result in no result in xref.


================
Comment at: unittests/clangd/XRefsTests.cpp:1259
+      namespace ns {
+      using [fo^o];
+      }
----------------
ilya-biryukov wrote:
> Shouldn't the `usings` always be qualified? Isn't this a compiler error?
Yes, this is a compiler error, but clang's error recovery can handle it. Fixed.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D55191





More information about the cfe-commits mailing list