Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
04e7c491
Commit
04e7c491
authored
Aug 13, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Propagate the decl specifiers.
parent
9061a828
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/shared/cplusplus/Bind.cpp
src/shared/cplusplus/Bind.cpp
+7
-5
No files found.
src/shared/cplusplus/Bind.cpp
View file @
04e7c491
...
...
@@ -110,8 +110,9 @@ void Bind::setDeclSpecifiers(Symbol *symbol, const FullySpecifiedType &declSpeci
symbol
->
setStorage
(
storage
);
if
(
Function
*
funTy
=
symbol
->
asFunction
())
{
if
(
declSpecifiers
.
isVirtual
())
if
(
declSpecifiers
.
isVirtual
())
{
funTy
->
setVirtual
(
true
);
}
}
if
(
declSpecifiers
.
isDeprecated
())
...
...
@@ -1723,6 +1724,7 @@ bool Bind::visit(SimpleDeclarationAST *ast)
setDeclSpecifiers
(
decl
,
type
);
if
(
Function
*
fun
=
decl
->
type
()
->
asFunctionType
())
{
setDeclSpecifiers
(
fun
,
type
);
if
(
declaratorId
&&
declaratorId
->
name
)
fun
->
setName
(
declaratorId
->
name
->
name
);
// update the function name
}
...
...
@@ -1862,18 +1864,18 @@ bool Bind::visit(ExceptionDeclarationAST *ast)
bool
Bind
::
visit
(
FunctionDefinitionAST
*
ast
)
{
// unsigned qt_invokable_token = ast->qt_invokable_token;
FullySpecifiedType
type
;
FullySpecifiedType
declSpecifiers
;
for
(
SpecifierListAST
*
it
=
ast
->
decl_specifier_list
;
it
;
it
=
it
->
next
)
{
type
=
this
->
specifier
(
it
->
value
,
type
);
declSpecifiers
=
this
->
specifier
(
it
->
value
,
declSpecifiers
);
}
DeclaratorIdAST
*
declaratorId
=
0
;
type
=
this
->
declarator
(
ast
->
declarator
,
t
ype
,
&
declaratorId
);
FullySpecifiedType
type
=
this
->
declarator
(
ast
->
declarator
,
declSpecifiers
.
qualifiedT
ype
()
,
&
declaratorId
);
Function
*
fun
=
type
->
asFunctionType
();
ast
->
symbol
=
fun
;
if
(
fun
)
{
setDeclSpecifiers
(
fun
,
type
);
setDeclSpecifiers
(
fun
,
declSpecifiers
);
if
(
_scope
->
isClass
())
{
fun
->
setVisibility
(
_visibility
);
...
...
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