diff options
author | John McCall <rjmccall@apple.com> | 2012-03-30 05:43:39 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-03-30 05:43:39 +0000 |
commit | 29bbd1a33edfd3c81c35d5076530c2867a05bddc (patch) | |
tree | 17d6384d260b32377d067b703f2d82c2c01a8eee /test/SemaObjC/foreach.m | |
parent | 26945addf1660d2c54af7be57bc9adb7ccc50a24 (diff) |
Handle placeholder expressions in an ObjC for-collection loop.
The way we handle this implicitly removes the ability to use
property l-values in this position, but that's really okay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/foreach.m')
-rw-r--r-- | test/SemaObjC/foreach.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaObjC/foreach.m b/test/SemaObjC/foreach.m index c865374e61..d0e0f7b9e2 100644 --- a/test/SemaObjC/foreach.m +++ b/test/SemaObjC/foreach.m @@ -46,3 +46,12 @@ int main () return 0; } +/* rdar://problem/11068137 */ +@interface Test2 +@property (assign) id prop; +@end +void test2(NSObject<NSFastEnumeration> *collection) { + Test2 *obj; + for (obj.prop in collection) { /* expected-error {{selector element is not a valid lvalue}} */ + } +} |