[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaObjC / bad-property-synthesis-crash.m
blob94c680489d916f8e291c3d06577beed0237b56f7
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2 // rdar://10177744
4 @interface Foo
5 @property (nonatomic, retain) NSString* what; // expected-error {{unknown type name 'NSString'}} \
6                                               // expected-error {{property with}} \
7                                               // expected-note {{previous definition is here}}
8 @end
9  
10 @implementation Foo
11 - (void) setWhat: (NSString*) value { // expected-error {{expected a type}} \
12                                       // expected-warning {{conflicting parameter types in implementation of}}
13   __what; // expected-error {{use of undeclared identifier}} \
14           // expected-warning {{expression result unused}}
16 @synthesize what; // expected-note {{'what' declared here}}
17 @end
19 @implementation Bar // expected-warning {{cannot find interface declaration for}}
20 - (NSString*) what { // expected-error {{expected a type}}
21   return __what; // expected-error {{use of undeclared identifier}}
23 @end