[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / SemaObjC / conversion.m
blobde616e4ae553d87713cead0624f0f157f663c434
1 // RUN: %clang_cc1 -Wconversion -fsyntax-only %s -verify
3 typedef signed char BOOL;
4 __attribute__((objc_root_class)) @interface RDar14415662
5 @property (readonly) BOOL stuff;
6 @property (readwrite) BOOL otherStuff;
7 @end
9 void radar14415662(RDar14415662 *f, char x, int y) {
10   f.otherStuff = !f.stuff; // no-warning
11   BOOL b = !f.stuff; // no-warning
13   // True positive to verify warning is working.
14   x = y; // expected-warning {{implicit conversion loses integer precision: 'int' to 'char'}}
17 __attribute__((objc_root_class)) @interface DoubleProp
18 @property double d;
19 @end
21 void use_double_prop(DoubleProp *dp) {
22   double local = 42;
23   dp.d += local; // no warning