logic: expanded indexer to cover more template argument related elements

* recording of usages of FunctionProtoTypes (e.g. "int(void)" can be used as a template argument)
* implemented solving names of dependent template specialization types (these are not as bad as it sounds ;) )
* implemented correct solving or decayed types
* fixed: qualified type usages are recorded in the correct context
* changed cxx indexer tests not to crash anymore when something is not found
This commit is contained in:
malte_langkabel
2016-11-24 15:56:55 +01:00
parent d787db57be
commit 3124a4320e
6 changed files with 778 additions and 485 deletions
@@ -97,6 +97,12 @@ bool CxxAstVisitor::TraverseType(clang::QualType t)
return base::TraverseType(t);
}
// same as base::TraverseQualifiedTypeLoc(..) but we need to make sure to call this.TraverseTypeLoc(..)
bool CxxAstVisitor::TraverseQualifiedTypeLoc(clang::QualifiedTypeLoc tl)
{
return TraverseTypeLoc(tl.getUnqualifiedLoc());
}
bool CxxAstVisitor::TraverseTypeLoc(clang::TypeLoc tl)
{
std::shared_ptr<ScopedFunctor> removeContextFunctor;
@@ -1210,6 +1216,7 @@ bool CxxAstVisitor::checkIgnoresTypeLoc(const clang::TypeLoc& tl)
(!tl.getAs<clang::TemplateTypeParmTypeLoc>().isNull()) ||
(!tl.getAs<clang::TemplateSpecializationTypeLoc>().isNull()) ||
(!tl.getAs<clang::DependentNameTypeLoc>().isNull()) ||
(!tl.getAs<clang::DependentTemplateSpecializationTypeLoc>().isNull()) ||
(!tl.getAs<clang::BuiltinTypeLoc>().isNull()) ||
(!tl.getAs<clang::AutoTypeLoc>().isNull())
){