diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-08 00:54:07 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-08 00:54:07 +0000 |
commit | bf1d884d9edeeb4b23b6ac8636c17e9af030e377 (patch) | |
tree | 3b53622f16c94ab0fdb5bee2dd33274e68375dab /clang/tools/libclang/IndexingContext.cpp | |
parent | 9a6ba3c94e2de96db1aabdf2f1a1ec4c2cb35c2e (diff) | |
download | bcm5719-llvm-bf1d884d9edeeb4b23b6ac8636c17e9af030e377.tar.gz bcm5719-llvm-bf1d884d9edeeb4b23b6ac8636c17e9af030e377.zip |
[libclang] Remove IndexingContext's getScopedContext(), it's not useful
now that client containers can be set via function calls.
llvm-svn: 146117
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index 657aed8f6a9..0b18167e806 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -532,7 +532,6 @@ void IndexingContext::addContainerInMap(const DeclContext *DC, if (!DC) return; - assert(getScopedContext(DC) == DC); ContainerMapTy::iterator I = ContainerMap.find(DC); if (I == ContainerMap.end()) { if (container) @@ -642,32 +641,11 @@ IndexingContext::getEntityContainer(const Decl *D) const { return DC; } -const DeclContext * -IndexingContext::getScopedContext(const DeclContext *DC) const { - // Local contexts are ignored for indexing. - const DeclContext *FuncCtx = cast<Decl>(DC)->getParentFunctionOrMethod(); - if (FuncCtx) - return FuncCtx; - - // We consider enums always scoped for indexing. - if (isa<TagDecl>(DC)) - return DC; - - if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(DC)) { - if (NS->isAnonymousNamespace()) - return getScopedContext(NS->getParent()); - return NS; - } - - return DC->getRedeclContext(); -} - CXIdxClientContainer IndexingContext::getClientContainerForDC(const DeclContext *DC) const { if (!DC) return 0; - DC = getScopedContext(DC); ContainerMapTy::const_iterator I = ContainerMap.find(DC); if (I == ContainerMap.end()) return 0; |