r205339 - More tests for DR1.

Richard Smith richard-llvm at metafoo.co.uk
Tue Apr 1 11:32:16 PDT 2014


Author: rsmith
Date: Tue Apr  1 13:32:16 2014
New Revision: 205339

URL: http://llvm.org/viewvc/llvm-project?rev=205339&view=rev
Log:
More tests for DR1.

Modified:
    cfe/trunk/test/CXX/drs/dr0xx.cpp

Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr0xx.cpp?rev=205339&r1=205338&r2=205339&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr0xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr0xx.cpp Tue Apr  1 13:32:16 2014
@@ -4,7 +4,7 @@
 
 namespace dr1 { // dr1: no
   namespace X { extern "C" void dr1_f(int a = 1); }
-  namespace Y { extern "C" void dr1_f(int a = 2); }
+  namespace Y { extern "C" void dr1_f(int a = 1); }
   using X::dr1_f; using Y::dr1_f;
   void g() {
     dr1_f(0);
@@ -25,7 +25,23 @@ namespace dr1 { // dr1: no
   }
   void X::z(int = 1) {} // expected-note {{previous}}
   namespace X {
-    void z(int = 2); // expected-error {{redefinition of default argument}}
+    void z(int = 1); // expected-error {{redefinition of default argument}}
+  }
+
+  void i(int = 1);
+  void j() {
+    void i(int = 1);
+    using dr1::i;
+    i(0);
+    // FIXME: This should be rejected, due to the ambiguous default argument.
+    i();
+  }
+  void k() {
+    using dr1::i;
+    void i(int = 1);
+    i(0);
+    // FIXME: This should be rejected, due to the ambiguous default argument.
+    i();
   }
 }
 





More information about the cfe-commits mailing list