blob: 8ae7375f7f2d86bd5b95487caca3227c84ab1c7b [file] [log] [blame]
Steven Wu92910f62016-03-10 02:02:48 +00001// RUN: %clang_cc1 -fsyntax-only -Wloop-analysis -verify %s
2// expected-no-diagnostics
3
4@interface MyArray
5- (id)objectAtIndexedSubscript:(unsigned int)idx;
6@end
7
8// Do not warn on objc classes has objectAtIndexedSubscript method.
9MyArray *test;
10void foo()
11{
12 unsigned int i;
13 for (i = 42; i > 0;) // No warnings here
14 (void)test[--i];
15}