data: fixed auto type
* fixed handling of non-deducible auto-type (e.g. when the auto-type depends on a template parameter).
This commit is contained in:
@@ -177,8 +177,17 @@ std::shared_ptr<DataType> CxxTypeNameResolver::typeToDataType(const clang::Type*
|
||||
}
|
||||
case clang::Type::Auto:
|
||||
{
|
||||
const clang::AutoType* autoType = clang::dyn_cast<clang::AutoType>(type);
|
||||
dataType = qualTypeToDataType(autoType->getDeducedType());
|
||||
clang::QualType deducedType = clang::dyn_cast<clang::AutoType>(type)->getDeducedType();
|
||||
if (!deducedType.isNull())
|
||||
{
|
||||
dataType = qualTypeToDataType(deducedType);
|
||||
}
|
||||
else
|
||||
{
|
||||
NameHierarchy typeNameHerarchy;
|
||||
typeNameHerarchy.push(std::make_shared<NameElement>("auto"));
|
||||
dataType = std::make_shared<NamedDataType>(typeNameHerarchy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case clang::Type::Decltype:
|
||||
|
||||
Reference in New Issue
Block a user