diff options
author | Kadir Cetinkaya <kadircet@google.com> | 2019-03-08 08:30:20 +0000 |
---|---|---|
committer | Kadir Cetinkaya <kadircet@google.com> | 2019-03-08 08:30:20 +0000 |
commit | e7eb27a9a0edd859de49bcc9af7ca27dbb435886 (patch) | |
tree | 9f7395d0d0530d77a8a2887c81e4e7565f275dc3 /clang/lib/Index/IndexSymbol.cpp | |
parent | 4505c99e7222885ecb746a913fc33aa9098cf098 (diff) | |
download | bcm5719-llvm-e7eb27a9a0edd859de49bcc9af7ca27dbb435886.tar.gz bcm5719-llvm-e7eb27a9a0edd859de49bcc9af7ca27dbb435886.zip |
[clang][Index] Mark references from Constructors and Destructors to class as NameReference
Summary:
In current indexing logic we get references to class itself when we see
a constructor/destructor which is only syntactically true. Semantically
this information is not correct. This patch marks that reference as
NameReference to let clients deal with it.
Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir
Reviewed By: gribozavr, nathawes
Subscribers: nathawes, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58814
llvm-svn: 355668
Diffstat (limited to 'clang/lib/Index/IndexSymbol.cpp')
-rw-r--r-- | clang/lib/Index/IndexSymbol.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexSymbol.cpp b/clang/lib/Index/IndexSymbol.cpp index 218f89360b8..a8f11b34486 100644 --- a/clang/lib/Index/IndexSymbol.cpp +++ b/clang/lib/Index/IndexSymbol.cpp @@ -396,6 +396,7 @@ bool index::applyForEachSymbolRoleInterruptible(SymbolRoleSet Roles, APPLY_FOR_ROLE(RelationContainedBy); APPLY_FOR_ROLE(RelationIBTypeOf); APPLY_FOR_ROLE(RelationSpecializationOf); + APPLY_FOR_ROLE(NameReference); #undef APPLY_FOR_ROLE @@ -438,6 +439,7 @@ void index::printSymbolRoles(SymbolRoleSet Roles, raw_ostream &OS) { case SymbolRole::RelationContainedBy: OS << "RelCont"; break; case SymbolRole::RelationIBTypeOf: OS << "RelIBType"; break; case SymbolRole::RelationSpecializationOf: OS << "RelSpecialization"; break; + case SymbolRole::NameReference: OS << "NameReference"; break; } }); } |