diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-07-06 18:04:13 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-07-06 18:04:13 +0000 |
commit | bdf3d9ad85ef09544d14db0e848a01c7df9cb028 (patch) | |
tree | 3eee494a14e3a316daac7db9c48fc5c512fe792f /test/SemaObjC/foreach.m | |
parent | 4cb3d909cb4af5efc073fd4122d4998c466a220e (diff) |
Objective-C: Warn when fast enumeration variable isn't used.
// rdar://14182680.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/foreach.m')
-rw-r--r-- | test/SemaObjC/foreach.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaObjC/foreach.m b/test/SemaObjC/foreach.m index d0e0f7b9e2..91ea2ec4e0 100644 --- a/test/SemaObjC/foreach.m +++ b/test/SemaObjC/foreach.m @@ -13,8 +13,8 @@ void f(NSArray *a) { * and no diagnostics even in pedantic mode should happen. * rdar://6814674 */ - for (id thisKey in keys); - for (id thisKey in keys); + for (id thisKey in keys); /* expected-warning {{unused variable 'thisKey'}} */ + for (id thisKey in keys); /* expected-warning {{unused variable 'thisKey'}} */ } /* // rdar://9072298 */ @@ -41,7 +41,7 @@ typedef struct { int main () { NSObject<NSFastEnumeration>* collection = ((void*)0); - for (id thing in collection) { } + for (id thing in collection) { } /* expected-warning {{unused variable 'thing'}} */ return 0; } |