diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-22 00:47:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-22 00:47:53 +0000 |
commit | 2bddd43bd87efedc308094e80af3917ef2c9a0d4 (patch) | |
tree | affa59b764131c52b58865aba7b09dc8d1187f97 /test | |
parent | 3a4653039524e1518243ae8e77ca10534e50e378 (diff) |
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
rdar://11501256
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/ARCMT/objcmt-subscripting-literals.m | 5 | ||||
-rw-r--r-- | test/ARCMT/objcmt-subscripting-literals.m.result | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/ARCMT/objcmt-subscripting-literals.m b/test/ARCMT/objcmt-subscripting-literals.m index 0371e2e2ca..6d626c4683 100644 --- a/test/ARCMT/objcmt-subscripting-literals.m +++ b/test/ARCMT/objcmt-subscripting-literals.m @@ -77,7 +77,9 @@ typedef const struct __CFString * CFStringRef; #define PAIR(x) @#x, [NSNumber numberWithInt:(x)] #define TWO(x) ((x), (x)) -@interface I +@interface I { + NSArray *ivarArr; +} @end @implementation I -(void) foo { @@ -138,6 +140,7 @@ typedef const struct __CFString * CFStringRef; o = [*parr objectAtIndex:2]; void *hd; o = [(NSArray*)hd objectAtIndex:2]; + o = [ivarArr objectAtIndex:2]; } @end diff --git a/test/ARCMT/objcmt-subscripting-literals.m.result b/test/ARCMT/objcmt-subscripting-literals.m.result index 333d0b4c38..a4eca6a447 100644 --- a/test/ARCMT/objcmt-subscripting-literals.m.result +++ b/test/ARCMT/objcmt-subscripting-literals.m.result @@ -77,7 +77,9 @@ typedef const struct __CFString * CFStringRef; #define PAIR(x) @#x, [NSNumber numberWithInt:(x)] #define TWO(x) ((x), (x)) -@interface I +@interface I { + NSArray *ivarArr; +} @end @implementation I -(void) foo { @@ -138,6 +140,7 @@ typedef const struct __CFString * CFStringRef; o = (*parr)[2]; void *hd; o = ((NSArray*)hd)[2]; + o = ivarArr[2]; } @end |