Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FixIt: use getLocForEndOfToken to insert fix-it after a type name.
Instead of setting DeclSpec's range end to point to the next token after the DeclSpec, we use getLocForEndOfToken to insert fix-it after a type name. Before this fix, fix-it will change ^(NSView view) to ^(*NSView view) This commit correctly updates the source to ^(NSView* view). rdar://21042144 Differential Revision: http://reviews.llvm.org/D20844 llvm-svn: 271448
- Loading branch information
1 parent
7b8ed4f
commit d063c5a
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s | ||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s | ||
// rdar://11311333 | ||
|
||
@interface NSView @end | ||
|
||
@interface INTF | ||
- (void) drawRect : inView:(NSView)view; | ||
- (void)test:(NSView )a; | ||
- (void)foo; | ||
@end | ||
|
||
// CHECK: {7:35-7:35}:"*" | ||
|
||
// CHECK: {8:21-8:21}:"*" | ||
@implementation INTF | ||
-(void)foo { | ||
^(NSView view) { | ||
}; | ||
} | ||
@end | ||
// CHECK: {16:11-16:11}:"*" |