[cfe-commits] [PATCH] ParseFunctionDeclarator

Douglas Gregor dgregor at apple.com
Tue Jul 5 09:44:35 PDT 2011


On Jul 4, 2011, at 10:34 AM, John Freeman wrote:

> Attached is an updated patch for ParseFunctionDeclarator. Main points:
> 
> - Parameter parsing is divided between ParseFunctionDeclaratorIdentifierList (existing) and ParseParameterDeclarationClause (new).
> - The decision to parse as an identifier-list has been factored to a new function, isFunctionDeclaratorIdentifierList.
> - In my opinion, the code structure is easier to read and better resembles the actual grammar it is parsing.
> - Parameters and backtracking have been removed where possible.
> - The number of calls to DeclaratorChunk::getFunction and Declarator::AddTypeInfo have been reduced from 3 to 1.
> - No tests were broken.


This is *much* cleaner, thanks! Committed as r134417.

	- Doug



More information about the cfe-commits mailing list