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
Tobias Hunger
qt-creator
Commits
b2baaee4
Commit
b2baaee4
authored
Aug 12, 2010
by
Roberto Raggi
Browse files
Search for symbols in the template prototype.
parent
efb60066
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/LookupContext.cpp
View file @
b2baaee4
...
...
@@ -283,12 +283,6 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
}
else
if
(
Function
*
fun
=
scope
->
asFunction
())
{
bindings
()
->
lookupInScope
(
name
,
fun
,
&
candidates
,
/*templateId = */
0
,
/*binding=*/
0
);
// ### port me
#if 0
for (TemplateParameters *it = fun->templateParameters(); it && candidates.isEmpty(); it = it->previous())
bindings()->lookupInScope(name, it->scope(), &candidates, /* templateId = */ 0, /*binding=*/ 0);
#endif
if
(
!
candidates
.
isEmpty
())
break
;
// it's an argument or a template parameter.
...
...
@@ -309,15 +303,13 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
if
(
!
candidates
.
isEmpty
())
break
;
// it's a formal argument.
}
else
if
(
Class
*
klass
=
scope
->
asClass
())
{
// ### port me
#if 0
for (TemplateParameters *it = klass->templateParameters(); it && candidates.isEmpty(); it = it->previous())
bindings()->lookupInScope(name, it->scope(), &candidates, /* templateId = */ 0, /*binding=*/ 0);
#endif
}
else
if
(
Template
*
templ
=
scope
->
asTemplate
())
{
bindings
()
->
lookupInScope
(
name
,
templ
,
&
candidates
,
/*templateId = */
0
,
/*binding=*/
0
);
if
(
!
candidates
.
isEmpty
())
break
;
// it's an argument or a template parameter.
return
candidates
;
// it's a template parameter.
}
else
if
(
Class
*
klass
=
scope
->
asClass
())
{
if
(
ClassOrNamespace
*
binding
=
bindings
()
->
lookupType
(
klass
))
{
candidates
=
binding
->
find
(
name
);
...
...
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