]> granicus.if.org Git - clang/commitdiff
Update C++ status and add a few more tests of overloading for member function calls
authorDouglas Gregor <dgregor@apple.com>
Mon, 12 Jan 2009 23:20:38 +0000 (23:20 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 12 Jan 2009 23:20:38 +0000 (23:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62121 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/overload-member-call.cpp
www/cxx_status.html

index 9c0117f9b14d985cb6ae0ae018f10cdaf6c9fc5d..8b7b148b3f892028eaccd402956b39a8ba24a6f8 100644 (file)
@@ -17,6 +17,23 @@ struct X {
   static double& g(double); // expected-note{{candidate function}}
 
   void h(int);
+
+  void test_member() {
+    float& f1 = f(0);
+    float& f2 = g(0);
+    double& d1 = g(0.0);
+  }
+
+  void test_member_const() const {
+    int &i1 = f(0);
+    int &i2 = g(0);
+    double& d1 = g(0.0);
+  }
+
+  static void test_member_static() {
+    double& d1 = g(0.0);
+    g(0); // expected-error{{call to 'g' is ambiguous; candidates are:}}
+  }
 };
 
 void test(X x, const X xc, X* xp, const X* xcp, volatile X xv, volatile X* xvp) {
index 96cd287af874d4d407c757e61967733e099611e9..4df163faebd7e45a8ce3f36939cf9b8e6f46d866 100644 (file)
@@ -411,9 +411,9 @@ welcome!</p>
   <td>&nbsp;&nbsp;4.3 [conv.func]</td>\r
   <td class="complete" align="center">&#x2713;</td>\r
   <td class="complete" align="center">&#x2713;</td>\r
-  <td class="medium" align="center"></td>\r
+  <td class="advanced" align="center"></td>\r
+  <td></td>\r
   <td></td>\r
-  <td>Missing conversions from overloaded functions to function pointers.</td>\r
 </tr>\r
 <tr>\r
   <td>&nbsp;&nbsp;4.4 [conv.qual]</td>\r
@@ -503,7 +503,7 @@ welcome!</p>
   <td></td>\r
   <td>template-ids are not supported, name lookup is not complete</td>\r
 </tr>\r
-<tr><td>&nbsp;&nbsp;5.2 [expr.post]</td><td></td><td></td><td></td><td></td><td>Note that overloading is not considered in this section</td></tr>\r
+<tr><td>&nbsp;&nbsp;5.2 [expr.post]</td><td></td><td></td><td></td><td></td><td></td></tr>\r
 <tr>\r
   <td>&nbsp;&nbsp;&nbsp;&nbsp;5.2.1 [expr.sub]</td>\r
   <td class="complete" align="center">&#x2713;</td>\r
@@ -518,7 +518,7 @@ welcome!</p>
   <td class="complete" align="center">&#x2713;</td>\r
   <td class="medium" align="center"></td>\r
   <td></td>\r
-  <td>Member calls don't work</td>\r
+  <td>Argument-dependent lookup is unsupported</td>\r
 </tr>\r
 <tr>\r
   <td>&nbsp;&nbsp;&nbsp;&nbsp;5.2.3 [expr.type.conv]</td>\r
@@ -539,10 +539,10 @@ welcome!</p>
 <tr>\r
   <td>&nbsp;&nbsp;&nbsp;&nbsp;5.2.5 [expr.ref]</td>\r
   <td class="complete" align="center">&#x2713;</td>\r
-  <td class="basic"></td>\r
-  <td class="basic"></td>\r
+  <td class="medium"></td>\r
+  <td class="medium"></td>\r
   <td></td>\r
-  <td>Only fields can be accessed</td>\r
+  <td>Cannot look up operator names, qualified-ids, or names in base classes</td>\r
 </tr>\r
 <tr>\r
   <td>&nbsp;&nbsp;&nbsp;&nbsp;5.2.6 [expr.post.incr]</td>\r