forked from qt-creator/qt-creator
C++: handle destructor names with template parameters.
Change-Id: I74b4fd5e043db935abc18345b303d294b71e8fc2 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
5
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
5
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
@@ -91,7 +91,7 @@ unsigned Bind::location(NameAST *name, unsigned defaultLocation) const
|
||||
return defaultLocation;
|
||||
|
||||
else if (DestructorNameAST *dtor = name->asDestructorName())
|
||||
return dtor->identifier_token;
|
||||
return location(dtor->unqualified_name, defaultLocation);
|
||||
|
||||
else if (TemplateIdAST *templId = name->asTemplateId())
|
||||
return templId->identifier_token;
|
||||
@@ -2624,8 +2624,7 @@ bool Bind::visit(SimpleNameAST *ast)
|
||||
|
||||
bool Bind::visit(DestructorNameAST *ast)
|
||||
{
|
||||
const Identifier *id = identifier(ast->identifier_token);
|
||||
_name = control()->destructorNameId(id);
|
||||
_name = control()->destructorNameId(name(ast->unqualified_name));
|
||||
ast->name = _name;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user