Proposed changes to cpp's parsesession

Olivier JG olivier.jg at gmail.com
Wed Feb 23 07:32:55 UTC 2011


In CPP lang's ParseSession::setContentsAndGenerateLocationTable(const 
PreprocessedContents& contents), it appends 4 zeros to the given 
preprocessed contents, the rationale being that the lexer needs that in 
order to not read too far. This is a problem because the parser 
generates an error when it tries to parse that content after lexing.
It doesn't seem like the lexer trips up over no-zero-added content 
anymore however, and I removed it (and fixed the parser tests that 
depended on it) without any issues cropping up.

Is there something else that would need to be fixed in order to get rid 
of that zero appending? Or is that just an old hack that's no longer 
needed? Patch attached.

-Olivier JG
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parsesession.diff
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110223/f32f2e36/attachment.ksh>


More information about the KDevelop-devel mailing list