[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / SemaObjC / property-assign-on-object-type.m
blob6125bb21ed3cd9aa7599118477deb3bfd3c94bfc
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wobjc-property-assign-on-object-type %s
3 @interface Foo @end
4 @protocol Prot @end
6 @interface Bar
7 @property(assign, readonly) Foo* o1; // expected-warning {{'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained'}}
8 @property(unsafe_unretained, readonly) Foo* o2;
10 @property(assign) Class classProperty;
11 @property(assign) Class<Prot> classWithProtocolProperty;
12 @property(assign) int s1;
13 @property(assign) int* s2;
14 @end
16 @interface Bar ()
17 @property(readwrite) Foo* o1;
18 @property(readwrite) Foo* o2;
19 @end