[cfe-commits] r136380 - /cfe/trunk/test/FixIt/fixit-function-call.cpp
Anna Zaks
ganna at apple.com
Thu Jul 28 12:55:52 PDT 2011
Author: zaks
Date: Thu Jul 28 14:55:52 2011
New Revision: 136380
URL: http://llvm.org/viewvc/llvm-project?rev=136380&view=rev
Log:
Another test case for the &/* mismatch fixit.
Modified:
cfe/trunk/test/FixIt/fixit-function-call.cpp
Modified: cfe/trunk/test/FixIt/fixit-function-call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-function-call.cpp?rev=136380&r1=136379&r2=136380&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit-function-call.cpp (original)
+++ cfe/trunk/test/FixIt/fixit-function-call.cpp Thu Jul 28 14:55:52 2011
@@ -71,7 +71,11 @@
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 @@
// 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
More information about the cfe-commits
mailing list