[libclang] Index C++ namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146019 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index f597797..3f934be 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -401,6 +401,13 @@
return handleDecl(D, D->getLocation(), getCursor(D), DInfo);
}
+bool IndexingContext::handleNamespace(const NamespaceDecl *D) {
+ DeclInfo DInfo(/*isRedeclaration=*/!D->isOriginalNamespace(),
+ /*isDefinition=*/true,
+ /*isContainer=*/true);
+ return handleDecl(D, D->getLocation(), getCursor(D), DInfo);
+}
+
bool IndexingContext::handleClassTemplate(const ClassTemplateDecl *D) {
return handleCXXRecordDecl(D->getTemplatedDecl(), D);
}