[cfe-commits] PATCH: Restart handling of a function declarator if the function name was typo-corrected (issue 4929043)

Kaelyn Uhrain rikka at google.com
Wed Aug 24 13:07:13 PDT 2011

Rietveld's upload.py seems to not have included the patch or description
when I used it to upload a new patchset to an existing issue. :'(

The new patch makes use of SFINAETrap to only accept a typo correction and
restart the function declaration handling if doing so doesn't trigger
additional errors--so no correcting to a declaration with mismatched const
qualifiers, etc. While adding the SFINAETrap usage, I also renamed
isNearlyMatchingFunction to hasSimilarParameters as I kept having to go look
at its body to remember if it checks anything about the two function
declarations other than the parameter list. I figured hasSimilarParameters
was a much better name for a function that checked if two FunctionDecls take
the same number of parameters and that the types of the parameters in each
position are the same or nearly so.


On Wed, Aug 24, 2011 at 12:57 PM, <rikka at google.com> wrote:

> http://codereview.appspot.com/**4929043/<http://codereview.appspot.com/4929043/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110824/2acac6ca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: function-redecl-typo-correction-fix.diff
Type: text/x-diff
Size: 9217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110824/2acac6ca/attachment.diff>

More information about the cfe-commits mailing list