r178942 - [objcmt] Fix a mishandled conversion to objc directory literal.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Apr 5 18:13:17 PDT 2013
Author: akirtzidis
Date: Fri Apr 5 20:13:17 2013
New Revision: 178942
URL: http://llvm.org/viewvc/llvm-project?rev=178942&view=rev
Log:
[objcmt] Fix a mishandled conversion to objc directory literal.
rdar://13181413
Modified:
cfe/trunk/lib/Edit/EditedSource.cpp
cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m
cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m.result
Modified: cfe/trunk/lib/Edit/EditedSource.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Edit/EditedSource.cpp?rev=178942&r1=178941&r2=178942&view=diff
==============================================================================
--- cfe/trunk/lib/Edit/EditedSource.cpp (original)
+++ cfe/trunk/lib/Edit/EditedSource.cpp Fri Apr 5 20:13:17 2013
@@ -188,6 +188,8 @@ void EditedSource::commitRemove(SourceLo
unsigned diff = EndOffs.getOffset() - TopEnd.getOffset();
TopEnd = EndOffs;
TopFA->RemoveLen += diff;
+ if (B == BeginOffs)
+ TopFA->Text = StringRef();
++I;
}
Modified: cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m?rev=178942&r1=178941&r2=178942&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m (original)
+++ cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m Fri Apr 5 20:13:17 2013
@@ -157,6 +157,7 @@ typedef const struct __CFString * CFStri
dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", [NSArray array], nil] forKeys:[NSArray arrayWithObjects:@"A", [arr objectAtIndex:2], nil]];
dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:arr];
dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:@[@"A", @"B"]];
+ dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray array], @"A", [NSArray array], @"B", nil];
}
@end
Modified: cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m.result
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m.result?rev=178942&r1=178941&r2=178942&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m.result (original)
+++ cfe/trunk/test/ARCMT/objcmt-subscripting-literals.m.result Fri Apr 5 20:13:17 2013
@@ -157,6 +157,7 @@ typedef const struct __CFString * CFStri
dict = @{@"A": @"1", arr[2]: @[]};
dict = [NSDictionary dictionaryWithObjects:@[@"1", @"2"] forKeys:arr];
dict = @{@"A": @"1", @"B": @"2"};
+ dict = @{@"A": @[], @"B": @[]};
}
@end
More information about the cfe-commits
mailing list