summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/foreach-1.m
blob: 9de32949033c6e74116c07c417f1d4d241b1726e (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: clang -fsyntax-only -verify %s

@class NSArray;

void f(NSArray *a)
{
    for (int i in a); // expected-error{{selector element type 'int' is not a valid object}}
    for ((id)2 in a); // expected-error{{selector element is not a valid lvalue}}
    for (2 in a); // expected-error{{selector element is not a valid lvalue}}
}
OpenPOWER on IntegriCloud