Author: dgregor
Date: Mon Aug 30 09:37:53 2010
New Revision: 112477

URL: http://llvm.org/viewvc/llvm-project?rev=112477&view=rev
Log:
Add test case from PR6952, which now works (thanks to Gabor).

Modified:
    cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p4.cpp

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p4.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p4.cpp?rev=112477&r1=112476&r2=112477&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p4.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p4.cpp Mon Aug 30 09:37:53 
2010
@@ -8,3 +8,21 @@
 
 X1<int> x1a; 
 X1<float> x1b; // expected-note {{in instantiation of}}
+
+template<typename T>
+struct X2 {
+  operator int();
+
+  friend void f(int x) { } // expected-error{{redefinition}} \
+                           // expected-note{{previous definition}}
+};
+
+int array0[sizeof(X2<int>)]; 
+int array1[sizeof(X2<float>)]; // expected-note{{instantiation of}}
+
+void g() {
+  X2<int> xi;
+  f(xi);
+  X2<float> xf; 
+  f(xf);
+}


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to