data: fixed indexer coverage

* revised the check if a declaration is implicit. this affects whether or not the reference to the decl should be recorded.
This commit is contained in:
malte_langkabel
2016-02-22 13:14:48 +01:00
parent 7847d53fbb
commit fc1a43c1a5
3 changed files with 27 additions and 5 deletions
+24 -4
View File
@@ -1076,15 +1076,35 @@ void ASTVisitor::RecordTypeRef(
}
}
bool ASTVisitor::isImpliciit(clang::Decl* d) const
{
if (!d)
{
return false;
}
if (clang::ClassTemplateSpecializationDecl* ctsd = clang::dyn_cast_or_null<clang::ClassTemplateSpecializationDecl>(d))
{
if (!ctsd->isExplicitSpecialization())
{
return true;
}
}
return isImpliciit(clang::dyn_cast_or_null<clang::Decl>(d->getDeclContext()));
}
void ASTVisitor::RecordDeclRef(
clang::NamedDecl *d,
clang::NamedDecl* d,
clang::SourceLocation beginLoc,
RefType refType,
SymbolType symbolType)
{
if ((!d) ||
(d->isImplicit() && !isLocatedInProjectFile(beginLoc)) ||
(!d->isImplicit() && !isLocatedInUnparsedProjectFile(beginLoc)))
bool isImplicit = isImpliciit(d);
if (!d ||
(isImplicit && !isLocatedInProjectFile(beginLoc)) ||
(!isImplicit && !isLocatedInUnparsedProjectFile(beginLoc)))
{
return;
}