diff options
author | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/SemaObjCXX/overload.mm | |
parent | a0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff) | |
download | FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.zip FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.tar.gz |
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700
Diffstat (limited to 'test/SemaObjCXX/overload.mm')
-rw-r--r-- | test/SemaObjCXX/overload.mm | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/SemaObjCXX/overload.mm b/test/SemaObjCXX/overload.mm index 7e79a42..960a7b2 100644 --- a/test/SemaObjCXX/overload.mm +++ b/test/SemaObjCXX/overload.mm @@ -51,12 +51,12 @@ void test0(A* a, B* b, id val) { } void test1(A* a) { - B* b = a; // expected-warning{{incompatible pointer types initializing 'A *' with an expression of type 'B *'}} + B* b = a; // expected-warning{{incompatible pointer types initializing 'B *' with an expression of type 'A *'}} B *c; c = a; // expected-warning{{incompatible pointer types assigning to 'A *' from 'B *'}} } void test2(A** ap) { - B** bp = ap; // expected-warning{{incompatible pointer types initializing 'A **' with an expression of type 'B **'}} + B** bp = ap; // expected-warning{{incompatible pointer types initializing 'B **' with an expression of type 'A **'}} bp = ap; // expected-warning{{incompatible pointer types assigning to 'A **' from 'B **'}} } @@ -149,3 +149,25 @@ namespace rdar8734046 { f2(a); } } + +namespace PR9735 { + int &f3(const A*); + float &f3(const void*); + + void test_f(B* b, const B* bc) { + int &ir1 = f3(b); + int &ir2 = f3(bc); + } +} + +@interface D : B +@end + +namespace rdar9327203 { + int &f(void* const&, int); + float &f(void* const&, long); + + void g(id x) { + int &fr = (f)(x, 0); + } +} |