diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-02-14 22:48:01 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-02-14 22:48:01 +0000 |
commit | d941de8a8a49694e4c677a5f83518204c9ead7e8 (patch) | |
tree | 748d65192f3675326708a6c5c7c3b1390d2ee39b /test/SemaObjC | |
parent | 4b7025f868850cc77511791ff9005ed40e26da1d (diff) |
[Sema] Fix-up a -Wfloat-conversion diagnostic
We were warning on valid ObjC property reference exprs, and passing
in the wrong arguments to DiagnoseFloatingImpCast (leading to a badly
worded diagnostic).
rdar://47644670
Differential revision: https://reviews.llvm.org/D58145
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC')
-rw-r--r-- | test/SemaObjC/conversion.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaObjC/conversion.m b/test/SemaObjC/conversion.m index 88a1a44b21..743f7440e2 100644 --- a/test/SemaObjC/conversion.m +++ b/test/SemaObjC/conversion.m @@ -14,4 +14,11 @@ void radar14415662(RDar14415662 *f, char x, int y) { x = y; // expected-warning {{implicit conversion loses integer precision: 'int' to 'char'}} } +__attribute__((objc_root_class)) @interface DoubleProp +@property double d; +@end +void use_double_prop(DoubleProp *dp) { + double local = 42; + dp.d += local; // no warning +} |