[cfe-commits] r99939 - in /cfe/trunk: lib/Parse/ParseCXXInlineMethods.cpp test/Parser/cxx-default-args.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Tue Mar 30 15:51:06 PDT 2010


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?

Oh, hold on, method defs do have a problem, patch to come..

-Argiris





More information about the cfe-commits mailing list