Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ObjC] Name lookup in methods shouldn't allow shadowing types (#116683)
Arguably as a bug, Clang has previously not mixed up Objective-C parameter names with types. This allows developers to write parameter names that _should_ shadow type names, but don't. For instance: @interface Foo -(void)foo:(int)id bar:(id)name; // OK @EnD Commit 9778808 changed the way that parameters are parsed to bring it more in line with how C parameters are parsed, but it breaks the example above. Given an expectation that the change wouldn't introduce source breaks, this is not something we can go forward with. 9778808 did this so that late-parsed attributes could reference Objective-C parameters. This change buffers Objective-C parameter info until after all parameters are parsed and turns them into parameter declarations before realizing late-parsed attributes instead. Radar-ID: 139996306 (cherry picked from commit 8bdf13b)
- Loading branch information