[libclang] Do not index implicit C++ member functions. rdar://10769813

llvm-svn: 150007
This commit is contained in:
Argyrios Kyrtzidis 2012-02-07 22:46:16 +00:00
parent 7ec12c928a
commit ea9b81b4c6
3 changed files with 5 additions and 2 deletions

View File

@ -243,6 +243,9 @@ public:
} // anonymous namespace
void IndexingContext::indexDecl(const Decl *D) {
if (D->isImplicit() && shouldIgnoreIfImplicit(D))
return;
bool Handled = IndexingDeclVisitor(*this).Visit(const_cast<Decl*>(D));
if (!Handled && isa<DeclContext>(D))
indexDeclContext(cast<DeclContext>(D));

View File

@ -1012,7 +1012,7 @@ CXCursor IndexingContext::getRefCursor(const NamedDecl *D, SourceLocation Loc) {
return clang_getNullCursor();
}
bool IndexingContext::shouldIgnoreIfImplicit(const NamedDecl *D) {
bool IndexingContext::shouldIgnoreIfImplicit(const Decl *D) {
if (isa<ObjCInterfaceDecl>(D))
return false;
if (isa<ObjCCategoryDecl>(D))

View File

@ -459,7 +459,7 @@ private:
CXCursor getRefCursor(const NamedDecl *D, SourceLocation Loc);
static bool shouldIgnoreIfImplicit(const NamedDecl *D);
static bool shouldIgnoreIfImplicit(const Decl *D);
};
class ScratchAlloc {