Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjC / dynamic-direct-properties.m
blobed79289eef6c7258ba476e12bb4e102ac3998b18
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wselector-type-mismatch %s
3 __attribute__((objc_root_class))
4 @interface Foo
5 @property() int dynamic_property;
6 @property(direct) int direct_property; // expected-note {{previous declaration is here}}
7 @end
9 @implementation Foo
10 @dynamic dynamic_property;
11 @dynamic direct_property; // expected-error {{direct property cannot be @dynamic}}
12 @end
14 @interface Foo (Bar)
15 @property() int dynamic_category_property;
16 @property(direct) int direct_category_property; // expected-note {{previous declaration is here}}
17 @end
19 @implementation Foo (Bar)
20 @dynamic dynamic_category_property;
21 @dynamic direct_category_property; // expected-error {{direct property cannot be @dynamic}}
22 @end