forked from qt-creator/qt-creator
C++: add semantic support for C++11 alias decls.
Task-number: QTCREATORBUG-9386 Change-Id: Ia68f3866c122ca5261dd73b2c740b47fb15744fc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
c2d6081a6c
commit
e2a727c450
21
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
21
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
@@ -2066,6 +2066,27 @@ bool Bind::visit(QtInterfacesDeclarationAST *ast)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Bind::visit(AliasDeclarationAST *ast)
|
||||
{
|
||||
if (!ast->name)
|
||||
return false;
|
||||
|
||||
const Name *name = this->name(ast->name);
|
||||
|
||||
FullySpecifiedType ty = expression(ast->typeId);
|
||||
ty.setTypedef(true);
|
||||
|
||||
Declaration *decl = control()->newDeclaration(ast->name->firstToken(), name);
|
||||
decl->setType(ty);
|
||||
decl->setStorage(Symbol::Typedef);
|
||||
ast->symbol = decl;
|
||||
if (_scope->isClass())
|
||||
decl->setVisibility(_visibility);
|
||||
_scope->addMember(decl);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Bind::visit(AsmDefinitionAST *ast)
|
||||
{
|
||||
(void) ast;
|
||||
|
||||
Reference in New Issue
Block a user