Skip to content
GitLab
Menu
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
39380669
Commit
39380669
authored
Aug 05, 2009
by
Roberto Raggi
Browse files
The parser needs to a valid AST when the parsing method returns `true'.
parent
80e26d86
Changes
1
Show whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
39380669
...
...
@@ -4317,7 +4317,7 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node)
bool
Parser
::
parseObjCMethodDefinition
(
DeclarationAST
*&
node
)
{
ObjCMethodPrototypeAST
*
method_prototype
;
ObjCMethodPrototypeAST
*
method_prototype
=
0
;
if
(
!
parseObjCMethodPrototype
(
method_prototype
))
return
false
;
...
...
@@ -4565,14 +4565,10 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
DeclarationAST
*
parameter_declaration
=
0
;
parseParameterDeclaration
(
parameter_declaration
);
}
node
=
ast
;
}
else
if
(
lookAtObjCSelector
())
{
ObjCSelectorWithoutArgumentsAST
*
sel
=
new
(
_pool
)
ObjCSelectorWithoutArgumentsAST
;
parseObjCSelector
(
sel
->
name_token
);
ast
->
selector
=
sel
;
node
=
ast
;
}
else
{
_translationUnit
->
error
(
cursor
(),
"expected a selector"
);
}
...
...
@@ -4581,6 +4577,7 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
while
(
parseAttributeSpecifier
(
*
attr
))
attr
=
&
(
*
attr
)
->
next
;
node
=
ast
;
return
true
;
}
...
...
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