summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-06 18:36:11 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-06 18:36:11 +0000
commit9bc2677b8ce6ffe8bf1de76e6293d555bcaf3f0e (patch)
tree8d947229d73e168a8b2d7abc6c0711763832a2ad /clang/test/CodeGenObjC
parentbb4a76fc95da9a56011420f0c206fd8e178b8eea (diff)
downloadbcm5719-llvm-9bc2677b8ce6ffe8bf1de76e6293d555bcaf3f0e.tar.gz
bcm5719-llvm-9bc2677b8ce6ffe8bf1de76e6293d555bcaf3f0e.zip
Do unary conversions on vararg arguments and *then* special-case float.
Fixes PR8742. llvm-svn: 121022
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/property.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/property.m b/clang/test/CodeGenObjC/property.m
index fe8737e9176..dd0786eb30e 100644
--- a/clang/test/CodeGenObjC/property.m
+++ b/clang/test/CodeGenObjC/property.m
@@ -89,3 +89,17 @@ void test3(test3_object *p) {
struct test3_struct array[1] = { p.s };
struct test3_nested agg = { p.s };
}
+
+// PR8742
+@interface Test4 {}
+@property float f;
+@end
+// CHECK: define void @test4
+void test4(Test4 *t) {
+ extern int test4_printf(const char *, ...);
+ // CHECK: [[TMP:%.*]] = call float {{.*}} @objc_msgSend
+ // CHECK-NEXT: [[EXT:%.*]] = fpext float [[TMP]] to double
+ // CHECK-NEXT: call i32 (i8*, ...)* @test4_printf(i8* {{.*}}, double [[EXT]])
+ // CHECK-NEXT: ret void
+ test4_printf("%.2f", t.f);
+}
OpenPOWER on IntegriCloud