summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/ivar-in-implementations.m
blob: 32d3c353d04f332107aec1c7236297e0b9808ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi2 -verify %s

@interface Super @end

@interface INTFSTANDALONE : Super
{
  id IVAR;	// expected-note {{previous definition is here}}
}

@end

@implementation INTFSTANDALONE : Super // expected-warning {{class implementation may not have super class}}
{
@private
  id IVAR1;
@protected
  id IVAR2;	// expected-error {{only private ivars may be declared in implementation}}
@private
  id IVAR3;
  int IVAR;	// expected-error {{instance variable is already declared}}
}
@end
OpenPOWER on IntegriCloud