diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /tools/libclang/IndexDecl.cpp | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) |
Notes
Diffstat (limited to 'tools/libclang/IndexDecl.cpp')
-rw-r--r-- | tools/libclang/IndexDecl.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp index 7560398395a54..4b6706fba783e 100644 --- a/tools/libclang/IndexDecl.cpp +++ b/tools/libclang/IndexDecl.cpp @@ -110,7 +110,7 @@ public: return true; } - bool VisitTypedefDecl(TypedefNameDecl *D) { + bool VisitTypedefNameDecl(TypedefNameDecl *D) { IndexCtx.handleTypedefName(D); IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D); return true; @@ -194,7 +194,7 @@ public: bool VisitObjCMethodDecl(ObjCMethodDecl *D) { // Methods associated with a property, even user-declared ones, are // handled when we handle the property. - if (D->isSynthesized()) + if (D->isPropertyAccessor()) return true; handleObjCMethod(D); @@ -228,12 +228,12 @@ public: } if (ObjCMethodDecl *MD = PD->getGetterMethodDecl()) { - if (MD->isSynthesized()) + if (MD->isPropertyAccessor()) IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(), D->getLexicalDeclContext()); } if (ObjCMethodDecl *MD = PD->getSetterMethodDecl()) { - if (MD->isSynthesized()) + if (MD->isPropertyAccessor()) IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(), D->getLexicalDeclContext()); } @@ -305,6 +305,11 @@ public: IndexCtx.indexTypeSourceInfo(D->getTemplatedDecl()->getTypeSourceInfo(), D); return true; } + + bool VisitImportDecl(ImportDecl *D) { + IndexCtx.importedModule(D); + return true; + } }; } // anonymous namespace @@ -325,7 +330,7 @@ void IndexingContext::indexDeclContext(const DeclContext *DC) { } } -void IndexingContext::indexTopLevelDecl(Decl *D) { +void IndexingContext::indexTopLevelDecl(const Decl *D) { if (isNotFromSourceFile(D->getLocation())) return; |