[cfe-commits] r160511 - /cfe/trunk/test/SemaCXX/crashes.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Jul 19 09:08:28 PDT 2012


Author: akirtzidis
Date: Thu Jul 19 11:08:28 2012
New Revision: 160511

URL: http://llvm.org/viewvc/llvm-project?rev=160511&view=rev
Log:
Add a test case for rdar://11806334.

Makes sure we don't overflow the stack.

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

Modified: cfe/trunk/test/SemaCXX/crashes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/crashes.cpp?rev=160511&r1=160510&r2=160511&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/crashes.cpp (original)
+++ cfe/trunk/test/SemaCXX/crashes.cpp Thu Jul 19 11:08:28 2012
@@ -104,3 +104,35 @@
       return;
   }
 }
+
+namespace rdar11806334 {
+
+class cc_YCbCr;
+
+class cc_rgb
+{
+ public:
+  cc_rgb( uint p ); // expected-error {{unknown type name}}
+  cc_rgb( cc_YCbCr v_in );
+};
+
+class cc_hsl
+{
+ public:
+  cc_rgb rgb();
+  cc_YCbCr YCbCr();
+};
+
+class cc_YCbCr
+{
+ public:
+  cc_YCbCr( const cc_rgb v_in );
+};
+
+cc_YCbCr cc_hsl::YCbCr()
+{
+ cc_YCbCr v_out = cc_YCbCr( rgb());
+ return v_out;
+}
+
+}





More information about the cfe-commits mailing list