On Mar 31, 2010, at 1:32 AM, Douglas Gregor wrote:

> 
> On Mar 30, 2010, at 3:14 PM, Argiris Kirtzidis wrote:
> 
>> Author: akirtzidis
>> Date: Tue Mar 30 17:14:32 2010
>> New Revision: 99939
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=99939&view=rev
>> Log:
>> When "delayed parsing" C++ default arguments, if there is an error, there 
>> may be tokens left in the token stream
>> that will interfere (they will be parsed as if they are after the class' 
>> '}') and a crash will occur because
>> the CachedTokens that holds them will be deleted while the lexer is still 
>> using them.
>> 
>> Make sure that the tokens of default args are removed from the token stream.
>> Fixes PR6647.
> 
> Isn't there the potential for having this same problem in 
> ParseLexedMethodDefs, where we've cached the tokens for the function body?

I've made a few tests and function bodies don't seem to have this problem, 
currently function bodies are fully parsed even in the case of errors.

Should I put an assert somewhere, for cached method bodies, to make sure ?

-Argiris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to