[cfe-commits] [PATCH] ParseFunctionDeclarator
John Freeman
jfreeman at cse.tamu.edu
Mon Jul 4 10:34:59 PDT 2011
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.
Feedback is welcome,
John
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pfd.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110704/df91567b/attachment.ksh>
More information about the cfe-commits
mailing list