[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 4 02:32:09 PDT 2018


ilya-biryukov added a comment.

In https://reviews.llvm.org/D47623#1119426, @ioeric wrote:

> Sorry for the late response Ilya. I was trying to test these cases. So, with the current change, if a real "canonical" declaration comes before the friend decl, then the reference will still be recorded (I've added a test case for this). Would this address your concern?


No worries about the late response.
I think we should **not** rely on an extra being before the friend declarations, i.e. we should count a reference either way.
The compiler does not enforce that and there's definitely lots of code where friend is the first decl. But it's totally up to you if you actually want to support this or not, of course. I do agree that this isn't ever going to be a major issue.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47623





More information about the cfe-commits mailing list