Create bindings for anonymous typedefs.

This commit is contained in:
Roberto Raggi
2010-05-26 10:08:29 +02:00
parent 1263babfc6
commit d2a62b07f0

View File

@@ -755,7 +755,7 @@ bool CreateBindings::visit(Enum *e)
bool CreateBindings::visit(Declaration *decl)
{
if (decl->isTypedef()) {
const FullySpecifiedType ty = decl->type();
FullySpecifiedType ty = decl->type();
const Identifier *typedefId = decl->identifier();
if (typedefId && ! (ty.isConst() || ty.isVolatile())) {
@@ -766,6 +766,11 @@ bool CreateBindings::visit(Declaration *decl)
Overview oo;
qDebug() << "found entity not found for" << oo(namedTy->name());
}
} else if (Class *klass = ty->asClassType()) {
if (const NameId *nameId = decl->name()->asNameId()) {
ClassOrNamespace *binding = _currentClassOrNamespace->findOrCreateType(nameId);
binding->addSymbol(klass);
}
}
}
}