mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 18:58:15 +00:00
[libclang] Index C++ namespaces.
llvm-svn: 146019
This commit is contained in:
parent
2f0400b780
commit
2b0b43cf56
@ -189,6 +189,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VisitNamespaceDecl(NamespaceDecl *D) {
|
||||
IndexCtx.handleNamespace(D);
|
||||
IndexCtx.indexDeclContext(D);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VisitClassTemplateDecl(ClassTemplateDecl *D) {
|
||||
IndexCtx.handleClassTemplate(D);
|
||||
if (D->isThisDeclarationADefinition())
|
||||
|
@ -401,6 +401,13 @@ bool IndexingContext::handleObjCProperty(const ObjCPropertyDecl *D) {
|
||||
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);
|
||||
}
|
||||
|
@ -370,6 +370,8 @@ public:
|
||||
|
||||
bool handleObjCProperty(const ObjCPropertyDecl *D);
|
||||
|
||||
bool handleNamespace(const NamespaceDecl *D);
|
||||
|
||||
bool handleClassTemplate(const ClassTemplateDecl *D);
|
||||
bool handleFunctionTemplate(const FunctionTemplateDecl *D);
|
||||
bool handleTypeAliasTemplate(const TypeAliasTemplateDecl *D);
|
||||
|
Loading…
Reference in New Issue
Block a user