diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
commit | 53992adde3eda3ccf9da63bc7e45673f043de18f (patch) | |
tree | 3558f327a6f9ab59c5d7a06528d84e1560445247 /test/SemaCXX/overload-call.cpp | |
parent | 7e411337c0ed226dace6e07f1420486768161308 (diff) | |
download | FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.zip FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.tar.gz |
Update clang to r104832.
Diffstat (limited to 'test/SemaCXX/overload-call.cpp')
-rw-r--r-- | test/SemaCXX/overload-call.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp index 79c74ce..29133c7 100644 --- a/test/SemaCXX/overload-call.cpp +++ b/test/SemaCXX/overload-call.cpp @@ -430,3 +430,33 @@ namespace PR6177 { void g() { f(""); } // expected-error{{volatile lvalue reference to type 'bool const volatile' cannot bind to a value of unrelated type 'char const [1]'}} } + +namespace PR7095 { + struct X { }; + + struct Y { + operator const X*(); + + private: + operator X*(); + }; + + void f(const X *); + void g(Y y) { f(y); } +} + +namespace PR7224 { + class A {}; + class B : public A {}; + + int &foo(A *const d); + float &foo(const A *const d); + + void bar() + { + B *const d = 0; + B const *const d2 = 0; + int &ir = foo(d); + float &fr = foo(d2); + } +} |