• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -Wsemicolon-before-method-body -verify %s
2// RUN: %clang_cc1 -fsyntax-only -Wsemicolon-before-method-body -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
3
4// Allow optional semicolon in objc method definition after method prototype,
5// warn about it and suggest a fixit.
6
7@interface NSObject
8@end
9
10@interface C : NSObject
11- (int)z;
12@end
13
14@implementation C
15- (int)z; // expected-warning {{semicolon before method body is ignored}}
16{
17  return 0;
18}
19@end
20
21// CHECK: fix-it:"{{.*}}":{15:9-15:10}:""
22
23