mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 05:55:43 -04:00

Stopping at '@' was originally intended to avoid skipping an '@' at the @interface context when doing parser recovery, but we should not stop at all '@' tokens because they may be part of expressions (e.g. in @"string", @selector(), etc.), so in most cases we will want to skip them. This commit caused 'test/Parser/method-def-in-class.m' to fail for the cases where we tried to recover from unmatched angle bracket but IMO it is not a big deal to not have good recovery from such broken code and the way we did recovery would not always work anyway (e.g. if there was '@' in an expression). The case that rdar://7029784 is about still passes. llvm-svn: 146815
15 lines
272 B
Objective-C
15 lines
272 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// rdar://7029784
|
|
|
|
@interface A
|
|
-(id) f0 { // expected-error {{expected ';' after method prototype}}
|
|
assert(0);
|
|
}
|
|
@end
|
|
|
|
@interface C
|
|
- (id) f0 { // expected-error {{expected ';' after method prototype}}
|
|
assert(0);
|
|
};
|
|
@end
|