[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-07 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes accepted this revision. nathawes added a comment. This revision is now accepted and ready to land. Thank you! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58814/new/ https://reviews.llvm.org/D58814 ___

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 189703. kadircet marked 2 inline comments as done. kadircet added a comment. - Delete extra parens Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58814/new/ https://reviews.llvm.org/D58814 Files:

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. As discussed offline constructor calls are a different issue, coming from even a different layer than Indexing API. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58814/new/ https://reviews.llvm.org/D58814

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. Do we also need to change anything for constructor calls? If not, please add a test for that. Comment at: lib/Index/IndexDecl.cpp:251 + Ctor->getParent(), Ctor->getDeclContext(), +

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 189695. kadircet added a comment. - Add NameReference role kind, and tag references from constructors/destructors to the class with that kind. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58814/new/

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-04 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes added a comment. Herald added a subscriber: ormris. In D58814#1415607 , @gribozavr wrote: > > These references were added to support using the index data for symbol > > rename. > > Understood -- thank you for providing the context (the original

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I agree with Dmitri's reasoning. I believe this should be handled inside the `renamer`s logic as mentioned in option 1. But if you believe this should not be the case, I am also happy to move logic of `adding a reference to class` on constructors to the consumer of

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. > These references were added to support using the index data for symbol rename. Understood -- thank you for providing the context (the original commit that added this code didn't have the explanation why this reference was added). However, my suggestion would be to

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-01 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes requested changes to this revision. nathawes added a comment. This revision now requires changes to proceed. These references were added to support using the index data for symbol rename. I.e. so that when you rename the class, you can use the index data to find all occurrences of its

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. Please also add a test for find references on a constructor. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58814/new/ https://reviews.llvm.org/D58814

[PATCH] D58814: [clang][Index] Constructors and Destructors do not reference class

2019-03-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: akyrtzi, gribozavr. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. In current indexing logic we get references to class itself when we see a constructor/destructor which is not true. Eventough spelling is