Mercurial > hg > CbC > CbC_llvm
diff clang/test/Parser/objc-foreach-syntax.m @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang/test/Parser/objc-foreach-syntax.m Thu Feb 13 15:10:13 2020 +0900 @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s + +struct __objcFastEnumerationState; +@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}} +- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount +{ + return 0; +} +@end + + +int LOOP(); + +@implementation MyList (BasicTest) +- (void)compilerTestAgainst { +MyList * el; + for (el in @"foo") + { LOOP(); } +} +@end + + +static int test7(id keys) { + for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}} +}