diff options
author | Anna Zaks <ganna@apple.com> | 2011-07-28 19:55:52 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-07-28 19:55:52 +0000 |
commit | 1d05d424cb2be0e3f369ec27d8fb8be20e9ba5ae (patch) | |
tree | 0792ed35c2ba4ee66f8a2317fa6721949ec497c0 | |
parent | 6722155dfe056e2c3dfbacbcaffae04dea0c2be0 (diff) |
Another test case for the &/* mismatch fixit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136380 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/FixIt/fixit-function-call.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/FixIt/fixit-function-call.cpp b/test/FixIt/fixit-function-call.cpp index d954267f0e..b8a08d2301 100644 --- a/test/FixIt/fixit-function-call.cpp +++ b/test/FixIt/fixit-function-call.cpp @@ -71,7 +71,11 @@ bool br(A &a); bool bp(A *a); bool dv(B b); -void dbcaller(A *ptra, B *ptrb, C &c) { +void u(int x); +void u(const C *x); +void u(double x); + +void dbcaller(A *ptra, B *ptrb, C &c, B &refb) { B b; // CHECK: error: no matching function for call to 'br @@ -94,11 +98,21 @@ void dbcaller(A *ptra, B *ptrb, C &c) { // CHECK: remove * bp(*ptra); +// CHECK: error: no viable overloaded '=' +// CHECK: remove & + b = &refb; + // TODO: Test that we do not provide a fixit when inheritance is private. // CHECK: error: no matching function for call to 'bp // There should not be a fixit here: // CHECK: fix-it bp(c); + +// CHECK: no matching function for call to 'u' +// CHECK: candidate function not viable: no known conversion from 'C' to 'const C *' for 1st argument; take the address of the argument with & +// CHECK: candidate function not viable +// CHECK: candidate function not viable + u(c); } // CHECK: errors generated |