Add a test case for rdar://11806334.

Makes sure we don't overflow the stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160511 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/crashes.cpp b/test/SemaCXX/crashes.cpp
index b77248e..d02704c 100644
--- a/test/SemaCXX/crashes.cpp
+++ b/test/SemaCXX/crashes.cpp
@@ -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;
+}
+
+}