xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/warn-implicit-atomic-property.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wimplicit-atomic-properties -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc// rdar://8774580
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@interface Super
5*f4a2713aSLionel Sambuc@property (nonatomic, readwrite) int P; // OK
6*f4a2713aSLionel Sambuc@property (atomic, readwrite) int P1; // OK
7*f4a2713aSLionel Sambuc@property (readwrite) int P2; // expected-note {{property declared here}}
8*f4a2713aSLionel Sambuc@property int P3; // expected-note {{property declared here}}
9*f4a2713aSLionel Sambuc@end
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc@implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property}}
12*f4a2713aSLionel Sambuc@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default}}
13*f4a2713aSLionel Sambuc@end
14