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
65a1c129
Commit
65a1c129
authored
Aug 11, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look only at template classes.
parent
97d93ed3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
src/plugins/cppeditor/cppchecksymbols.cpp
src/plugins/cppeditor/cppchecksymbols.cpp
+14
-1
src/plugins/cppeditor/cppchecksymbols.h
src/plugins/cppeditor/cppchecksymbols.h
+2
-0
No files found.
src/plugins/cppeditor/cppchecksymbols.cpp
View file @
65a1c129
...
...
@@ -845,6 +845,19 @@ void CheckSymbols::addType(ClassOrNamespace *b, NameAST *ast)
//qDebug() << "added use" << oo(ast->name) << line << column << length;
}
bool
CheckSymbols
::
isTemplateClass
(
Symbol
*
symbol
)
const
{
if
(
symbol
)
{
if
(
Template
*
templ
=
symbol
->
asTemplate
())
{
if
(
Symbol
*
declaration
=
templ
->
declaration
())
{
if
(
declaration
->
isClass
())
return
true
;
}
}
}
return
false
;
}
void
CheckSymbols
::
addTypeOrStatic
(
const
QList
<
LookupItem
>
&
candidates
,
NameAST
*
ast
)
{
unsigned
startToken
=
ast
->
firstToken
();
...
...
@@ -862,7 +875,7 @@ void CheckSymbols::addTypeOrStatic(const QList<LookupItem> &candidates, NameAST
else
if
(
c
->
isUsingNamespaceDirective
())
// ... and using namespace directives.
continue
;
else
if
(
c
->
isTypedef
()
||
c
->
isNamespace
()
||
c
->
isClass
()
||
c
->
isEnum
()
||
c
->
isTemplate
(
)
||
c
->
isClass
()
||
c
->
isEnum
()
||
isTemplateClass
(
c
)
||
c
->
isForwardClassDeclaration
()
||
c
->
isTypenameArgument
()
||
c
->
enclosingEnum
()
!=
0
)
{
unsigned
line
,
column
;
...
...
src/plugins/cppeditor/cppchecksymbols.h
View file @
65a1c129
...
...
@@ -117,6 +117,8 @@ protected:
void
addClassMember
(
const
QList
<
LookupItem
>
&
candidates
,
NameAST
*
ast
);
void
addVirtualMethod
(
const
QList
<
LookupItem
>
&
candidates
,
NameAST
*
ast
,
unsigned
argumentCount
);
bool
isTemplateClass
(
Symbol
*
s
)
const
;
Scope
*
enclosingScope
()
const
;
FunctionDefinitionAST
*
enclosingFunctionDefinition
()
const
;
TemplateDeclarationAST
*
enclosingTemplateDeclaration
()
const
;
...
...
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