C++: Enable showEnclosingTemplate also for function type

Do not require directly passing the enclosing template.

Change-Id: Ie03bc58338fe003677a5f5311d86d70f499373ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-21 22:21:03 +03:00
committed by Orgad Shaneh
parent 50a6c47830
commit 39aff55d8a
3 changed files with 25 additions and 24 deletions
@@ -107,11 +107,13 @@ static FullySpecifiedType fnTy(const QString &name, const FullySpecifiedType &re
return FullySpecifiedType(fn);
}
static FullySpecifiedType templTy(const FullySpecifiedType &declTy, bool isClassDeclarator)
static FullySpecifiedType templTy(FullySpecifiedType declTy, bool isClassDeclarator)
{
Template *templ = new Template(0, 0, nameId(""));
templ->addMember(typenameArg("T", isClassDeclarator));
templ->addMember(decl(declTy));
if (Function *func = declTy->asFunctionType())
func->setEnclosingScope(templ);
return FullySpecifiedType(templ);
}