Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5cb42c93
Commit
5cb42c93
authored
May 17, 2010
by
Roberto Raggi
Browse files
Instantiate the template functions.
parent
38f6379f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/LookupContext.cpp
View file @
5cb42c93
...
...
@@ -391,34 +391,28 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
else
if
(
s
->
name
()
->
isQualifiedNameId
())
continue
;
// skip qualified ids.
if
(
debug
)
{
if
(
templateId
&&
(
s
->
isDeclaration
()
||
s
->
isFunction
()))
{
if
(
templateId
&&
(
s
->
isDeclaration
()
||
s
->
isFunction
()))
{
FullySpecifiedType
ty
=
GenTemplateInstance
::
instantiate
(
templateId
,
s
,
_control
);
FullySpecifiedType
ty
=
GenTemplateInstance
::
instantiate
(
templateId
,
s
,
_control
);
if
(
debug
)
{
Overview
oo
;
oo
.
setShowFunctionSignatures
(
true
);
oo
.
setShowReturnTypes
(
true
);
qDebug
()
<<
"instantiate:"
<<
oo
(
s
->
type
(),
s
->
name
())
<<
"using:"
<<
oo
(
templateId
)
<<
oo
(
ty
);
}
qDebug
()
<<
"TODO: instantiate:"
<<
oo
(
s
->
type
(),
s
->
name
())
<<
"using:"
<<
oo
(
templateId
)
<<
oo
(
ty
);
#if 0
if (Declaration *decl = s->asDeclaration()) {
qDebug() << "instantiate declaration";
Declaration *d = _control->newDeclaration(0, 0);
d->copy(decl);
d->setType(ty);
result->append(d);
continue;
} else if (Function *fun = s->asFunction()) {
qDebug() << "instantiate function";
Function *d = ty->asFunctionType();
d->copy(fun);
result->append(d);
continue;
}
#endif
if
(
Declaration
*
decl
=
s
->
asDeclaration
())
{
Declaration
*
d
=
_control
->
newDeclaration
(
0
,
0
);
d
->
copy
(
decl
);
d
->
setType
(
ty
);
result
->
append
(
d
);
continue
;
}
else
if
(
Function
*
fun
=
s
->
asFunction
())
{
Function
*
d
=
ty
->
asFunctionType
();
d
->
copy
(
fun
);
result
->
append
(
d
);
continue
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment