[cfe-commits] r104023 - in /cfe/trunk: lib/Sema/SemaLookup.cpp test/FixIt/typo.m

Chris Lattner clattner at apple.com
Tue May 18 09:40:46 PDT 2010


On May 18, 2010, at 9:30 AM, Douglas Gregor wrote:

> Author: dgregor
> Date: Tue May 18 11:30:22 2010
> New Revision: 104023
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=104023&view=rev
> Log:
> Give a slight edge to the context-sensitive keyword 'super' over
> non-function-local declarations with names similar to what the user
> typed. For example, this allows us to correct 'supper' to 'super' in
> an Objective-C message send, even though the C function 'isupper' has
> the same edit distance.

This is clearly the right thing to do.  However, I wonder if isupper should also be punished because it's type doesn't make sense as a receiver of an objc message.  While objc is pretty "loose" when it comes to allowing arbitrary pointer types as receivers, the spell check logic could assume or heavily bias the receivers with types that make sense.

-Chris



More information about the cfe-commits mailing list