Skip to content
GitLab
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
f335855a
Commit
f335855a
authored
May 25, 2010
by
Roberto Raggi
Browse files
Warn about unexpected using declarations.
parent
405353ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/LookupContext.cpp
View file @
f335855a
...
...
@@ -482,11 +482,15 @@ ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name,
return
e
;
else
if
(
_templateId
)
{
Q_ASSERT
(
_usings
.
size
()
==
1
);
ClassOrNamespace
*
delegate
=
_usings
.
first
();
if
(
ClassOrNamespace
*
r
=
delegate
->
lookupType_helper
(
name
,
processed
,
/*searchInEnclosingScope = */
true
))
return
r
;
if
(
_usings
.
size
()
==
1
)
{
ClassOrNamespace
*
delegate
=
_usings
.
first
();
if
(
ClassOrNamespace
*
r
=
delegate
->
lookupType_helper
(
name
,
processed
,
/*searchInEnclosingScope = */
true
))
return
r
;
}
else
{
if
(
debug
)
qWarning
()
<<
"expected one using declaration. Number of using declarations is:"
<<
_usings
.
size
();
}
}
foreach
(
ClassOrNamespace
*
u
,
usings
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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