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
Marco Bubke
flatpak-qt-creator
Commits
c3d7928a
Commit
c3d7928a
authored
Mar 30, 2010
by
Roberto Raggi
Browse files
Clone the TemplateArguments before caching the result.
parent
ed74fdd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
c3d7928a
...
...
@@ -854,12 +854,19 @@ bool Parser::parseTemplateArgumentList(TemplateArgumentListAST *&node)
}
}
if
(
_pool
!=
_translationUnit
->
memoryPool
())
{
MemoryPool
*
pool
=
_translationUnit
->
memoryPool
();
TemplateArgumentListAST
*
template_argument_list
=
node
;
for
(
TemplateArgumentListAST
*
iter
=
template_argument_list
,
**
ast_iter
=
&
node
;
iter
;
iter
=
iter
->
next
,
ast_iter
=
&
(
*
ast_iter
)
->
next
)
*
ast_iter
=
new
(
pool
)
TemplateArgumentListAST
((
iter
->
value
)
?
iter
->
value
->
clone
(
pool
)
:
0
);
}
_templateArgumentList
.
insert
(
std
::
make_pair
(
start
,
TemplateArgumentListEntry
(
start
,
cursor
(),
node
)));
return
true
;
}
_templateArgumentList
.
insert
(
std
::
make_pair
(
start
,
TemplateArgumentListEntry
(
start
,
cursor
(),
0
)));
return
false
;
}
...
...
Write
Preview
Supports
Markdown
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