diff options
| author | Ben Langmuir <blangmuir@apple.com> | 2017-08-16 23:12:21 +0000 |
|---|---|---|
| committer | Ben Langmuir <blangmuir@apple.com> | 2017-08-16 23:12:21 +0000 |
| commit | fd6e39c40b0f78274bc00f785f2e30cd497dd1c2 (patch) | |
| tree | 8d0147cac4b5885454667b99a53694a3988b48ab /clang/lib/Index/IndexDecl.cpp | |
| parent | 4abc3f6036017f0996ccc860a174773a989316b1 (diff) | |
| download | bcm5719-llvm-fd6e39c40b0f78274bc00f785f2e30cd497dd1c2.tar.gz bcm5719-llvm-fd6e39c40b0f78274bc00f785f2e30cd497dd1c2.zip | |
[index] Add indexing for unresolved-using declarations
In dependent contexts we end up referencing these, so make sure they
have USRs, and have their declarations indexed. For the most part they
behave like typedefs, but we also need to worry about having multiple
using declarations with the same "name".
rdar://problem/33883650
llvm-svn: 311053
Diffstat (limited to 'clang/lib/Index/IndexDecl.cpp')
| -rw-r--r-- | clang/lib/Index/IndexDecl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp index fe6beef6705..ee28ef737d9 100644 --- a/clang/lib/Index/IndexDecl.cpp +++ b/clang/lib/Index/IndexDecl.cpp @@ -611,6 +611,24 @@ public: SymbolRoleSet()); } + bool VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D) { + TRY_DECL(D, IndexCtx.handleDecl(D)); + const DeclContext *DC = D->getDeclContext()->getRedeclContext(); + const NamedDecl *Parent = dyn_cast<NamedDecl>(DC); + IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent, + D->getLexicalDeclContext()); + return true; + } + + bool VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D) { + TRY_DECL(D, IndexCtx.handleDecl(D)); + const DeclContext *DC = D->getDeclContext()->getRedeclContext(); + const NamedDecl *Parent = dyn_cast<NamedDecl>(DC); + IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent, + D->getLexicalDeclContext()); + return true; + } + bool VisitClassTemplateSpecializationDecl(const ClassTemplateSpecializationDecl *D) { // FIXME: Notify subsequent callbacks if info comes from implicit |

