Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
52b062c4
Commit
52b062c4
authored
14 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Look only at the viable functions.
parent
5950aedf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/cppeditor/cppchecksymbols.cpp
+17
-12
17 additions, 12 deletions
src/plugins/cppeditor/cppchecksymbols.cpp
with
17 additions
and
12 deletions
src/plugins/cppeditor/cppchecksymbols.cpp
+
17
−
12
View file @
52b062c4
...
...
@@ -780,10 +780,6 @@ void CheckSymbols::addType(const QList<LookupItem> &candidates, NameAST *ast)
if
(
tok
.
generated
())
return
;
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
foreach
(
const
LookupItem
&
r
,
candidates
)
{
Symbol
*
c
=
r
.
declaration
();
if
(
c
->
isUsingDeclaration
())
// skip using declarations...
...
...
@@ -793,6 +789,11 @@ void CheckSymbols::addType(const QList<LookupItem> &candidates, NameAST *ast)
else
if
(
c
->
isTypedef
()
||
c
->
isNamespace
()
||
c
->
isClass
()
||
c
->
isEnum
()
||
c
->
isForwardClassDeclaration
()
||
c
->
isTypenameArgument
())
{
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
const
Use
use
(
line
,
column
,
length
,
Use
::
Type
);
addUse
(
use
);
//qDebug() << "added use" << oo(ast->name) << line << column << length;
...
...
@@ -811,10 +812,6 @@ void CheckSymbols::addClassMember(const QList<LookupItem> &candidates, NameAST *
if
(
tok
.
generated
())
return
;
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
foreach
(
const
LookupItem
&
r
,
candidates
)
{
Symbol
*
c
=
r
.
declaration
();
if
(
!
c
)
...
...
@@ -826,6 +823,10 @@ void CheckSymbols::addClassMember(const QList<LookupItem> &candidates, NameAST *
else
if
(
c
->
isTypedef
()
||
c
->
type
()
->
isFunctionType
())
return
;
// shadowed
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
const
Use
use
(
line
,
column
,
length
,
Use
::
Field
);
addUse
(
use
);
break
;
...
...
@@ -842,10 +843,6 @@ void CheckSymbols::addVirtualMethod(const QList<LookupItem> &candidates, NameAST
if
(
tok
.
generated
())
return
;
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
foreach
(
const
LookupItem
&
r
,
candidates
)
{
Symbol
*
c
=
r
.
declaration
();
if
(
!
c
)
...
...
@@ -858,6 +855,14 @@ void CheckSymbols::addVirtualMethod(const QList<LookupItem> &candidates, NameAST
continue
;
else
if
(
argumentCount
<
funTy
->
minimumArgumentCount
())
continue
;
else
if
(
argumentCount
>
funTy
->
argumentCount
())
{
if
(
!
funTy
->
isVariadic
())
continue
;
}
unsigned
line
,
column
;
getTokenStartPosition
(
startToken
,
&
line
,
&
column
);
const
unsigned
length
=
tok
.
length
();
const
Use
use
(
line
,
column
,
length
,
Use
::
VirtualMethod
);
addUse
(
use
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment