[cfe-commits] r172283 - /cfe/trunk/test/SemaCXX/linkage2.cpp

Rafael Espindola rafael.espindola at gmail.com
Fri Jan 11 17:01:07 PST 2013


Author: rafael
Date: Fri Jan 11 19:01:06 2013
New Revision: 172283

URL: http://llvm.org/viewvc/llvm-project?rev=172283&view=rev
Log:
Add a test from pr14898.

Modified:
    cfe/trunk/test/SemaCXX/linkage2.cpp

Modified: cfe/trunk/test/SemaCXX/linkage2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/linkage2.cpp?rev=172283&r1=172282&r2=172283&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/linkage2.cpp (original)
+++ cfe/trunk/test/SemaCXX/linkage2.cpp Fri Jan 11 19:01:06 2013
@@ -48,3 +48,26 @@
     void g();
   }
 }
+
+// pr14898
+namespace test6 {
+  template <class _Rp>
+  class __attribute__ ((__visibility__("default"))) shared_future;
+  template <class _Rp>
+  class future {
+    template <class> friend class shared_future;
+    shared_future<_Rp> share();
+  };
+  template <class _Rp> future<_Rp>
+  get_future();
+  template <class _Rp>
+  struct shared_future<_Rp&> {
+    shared_future(future<_Rp&>&& __f); // expected-warning {{rvalue references are a C++11 extension}}
+  };
+  void f() {
+    typedef int T;
+    get_future<int>();
+    typedef int& U;
+    shared_future<int&> f1 = get_future<int&>();
+  }
+}





More information about the cfe-commits mailing list