mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-26 14:58:59 -04:00

of a method that was declared in an invalid interface This commit fixes an infinite loop that occurs when clang tries to iterate over redeclaration of a method that was declared in an invalid @interface. The existing validity checks don't catch this as that @interface is a duplicate of a previously declared valid @interface declaration, so we have to verify that the found redeclaration is in a valid declaration context. rdar://29220965 Differential Revision: https://reviews.llvm.org/D26664 llvm-svn: 287530
22 lines
431 B
Objective-C
22 lines
431 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -verify -Wdocumentation -Wno-objc-root-class %s
|
|
// rdar://29220965
|
|
|
|
@interface InvalidInterface { // expected-note {{previous definition is here}}
|
|
int *_property;
|
|
}
|
|
|
|
@end
|
|
|
|
/*!
|
|
*/
|
|
|
|
@interface InvalidInterface // expected-error {{duplicate interface definition for class 'InvalidInterface'}}
|
|
@property int *property;
|
|
|
|
-(void) method;
|
|
@end
|
|
|
|
@implementation InvalidInterface
|
|
-(void) method { }
|
|
@end
|