diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-05-30 18:53:21 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-05-30 18:53:21 +0000 |
| commit | 0f6d5ca0bff5ed83f4ee8ba28ea7545d4218ae60 (patch) | |
| tree | 69bde8dec3e99be2e9b2c6e20b37c6bf4804250a /clang/test/Sema/warn-documentation.m | |
| parent | a800f955e93bffb2c4a41a0ade00ae71524c1fbc (diff) | |
| download | bcm5719-llvm-0f6d5ca0bff5ed83f4ee8ba28ea7545d4218ae60.tar.gz bcm5719-llvm-0f6d5ca0bff5ed83f4ee8ba28ea7545d4218ae60.zip | |
Fix potential infinite loop when iterating over redeclarations of an ObjMethodDecl, resulting from invalid code.
Check for invalid decls in ObjCMethodDecl::getNextRedeclaration(); otherwise if we start from an invalid redeclaration
of an @implementation we would move to the @interface and not reach the original declaration again.
Fixes rdar://14024851
llvm-svn: 182951
Diffstat (limited to 'clang/test/Sema/warn-documentation.m')
| -rw-r--r-- | clang/test/Sema/warn-documentation.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.m b/clang/test/Sema/warn-documentation.m index 1d3114617eb..17dd92e6eba 100644 --- a/clang/test/Sema/warn-documentation.m +++ b/clang/test/Sema/warn-documentation.m @@ -203,3 +203,15 @@ int FooBar(); @interface Asset : NSObject @end +// rdar://14024851 Check that this does not enter an infinite loop +@interface rdar14024851 +-(void)meth; // expected-note {{declared here}} +@end + +@implementation rdar14024851 // expected-warning {{method definition for 'meth' not found}} expected-note {{previous definition}} +@end + +@implementation rdar14024851 // expected-error {{reimplementation}} +/// \brief comment +-(void)meth {} +@end |

