<div class="gmail_quote">On Thu, Aug 18, 2011 at 3:25 PM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com">rikka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This is actually a limitation I'm currently aware of, where DiagnoseInvalidRedeclaration will correct typos but cannot correct missing function qualifiers like "const", and that when both are present the fixit doesn't completely fix the code. I feel that, while imperfect, having the fixit with this limitation is more beneficial than doing the typo correction but not providing any fixit--so that invalid redeclarations that only suffer from a mistyped name can be fixed.</blockquote>
<div><br></div><div>No, this really isn't how we want fixit hints to work. When providing a fixit hint for an *error*, we need to recover the parsing and analyzing as if that fixit hint had been applied. We don't want to have to iterate to reach a stable state.</div>
<div>Â </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> If the name required typo correction *and* there was some other mismatch then there might be something wonkier than a simple typo. If the consensus is that the fixit should only be given when it completely fixes any issue with the redeclaration I can try to figure out and add the hoops necessary to only suggest the fixit if there is a function declaration that exactly matches the typo-corrected redeclaration.</blockquote>
<div><br></div><div>Yes, please. The ideal way to do this is to re-do any semantic analysis on the newly selected redeclaration which already took place on the old one before deciding it to not match. </div></div><br>