[cfe-commits] [PATCH] ParseFunctionDeclarator
John Freeman
jfreeman at cse.tamu.edu
Wed Jun 29 11:06:16 PDT 2011
This patch extracts a copy-pasted code path into a new function,
ParseParameterDeclarationClause, that will also be used for lambda
expressions. Clang still passed all tests with these changes.
In C++, ParseFunctionDeclarator parses some extra bits after a function
parameter list:
cv-qualifier-seq[opt]
ref-qualifier[opt]
exception-specification[opt]
trailing-return-type[opt]
This code was identical in two places within ParseFunctionDeclarator:
once each for empty and non-empty parameter lists.
As part of the factoring, some new code was introduced into the path for
empty parameter lists, notably entering prototype scope for the above
sequence. I am not as familiar with the language as some of the experts
here, so I do not know if this change is improper. It does not appear to
have affected the tests.
I added some FIXMEs to the new function,
ParseParameterDeclarationClause. Comments on those would be appreciated.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pfd.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110629/7a0b3daf/attachment.ksh>
More information about the cfe-commits
mailing list