Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
52b062c4
Commit
52b062c4
authored
Aug 09, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look only at the viable functions.
parent
5950aedf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
src/plugins/cppeditor/cppchecksymbols.cpp
src/plugins/cppeditor/cppchecksymbols.cpp
+17
-12
No files found.
src/plugins/cppeditor/cppchecksymbols.cpp
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
);
...
...
Write
Preview
Markdown
is supported
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