mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 00:36:05 +00:00

Summary: For PseudoObjectExpr, the DeclMatcher need to search only all the semantics but also need to search pass OpaqueValueExpr for all potential uses for the Decl. Reviewers: thakis, rtrieu, rjmccall, doug.gregor Subscribers: xazax.hun, rjmccall, doug.gregor, cfe-commits Differential Revision: http://reviews.llvm.org/D17627 llvm-svn: 263087
16 lines
343 B
Objective-C
16 lines
343 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -Wloop-analysis -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
@interface MyArray
|
|
- (id)objectAtIndexedSubscript:(unsigned int)idx;
|
|
@end
|
|
|
|
// Do not warn on objc classes has objectAtIndexedSubscript method.
|
|
MyArray *test;
|
|
void foo()
|
|
{
|
|
unsigned int i;
|
|
for (i = 42; i > 0;) // No warnings here
|
|
(void)test[--i];
|
|
}
|