]> granicus.if.org Git - clang/commitdiff
Add test case for rdar://11293995
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 27 Apr 2012 04:31:46 +0000 (04:31 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 27 Apr 2012 04:31:46 +0000 (04:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155690 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/invalid-member-expr.cpp

index 287d9af13094118ed993d32787078b2e77bf02fa..87da79a27c0cbd1d372c0f21c1ecc572f7777734 100644 (file)
@@ -37,3 +37,34 @@ namespace test3 {
     string::iterator i = s.foo(); // expected-error {{no member named 'foo'}}
   }
 }
+
+
+// Make sure we don't crash.
+namespace rdar11293995 {
+
+struct Length {
+  explicit Length(PassRefPtr<CalculationValue>); // expected-error {{unknown type name}} \
+                    expected-error {{expected ')'}} \
+                    expected-note {{to match this '('}}
+};
+
+struct LengthSize {
+    Length m_width;
+    Length m_height;
+};
+
+enum EFillSizeType { Contain, Cover, SizeLength, SizeNone };
+
+struct FillSize {
+    EFillSizeType type;
+    LengthSize size;
+};
+
+class FillLayer {
+public:
+    void setSize(FillSize f) { m_sizeType = f.type;}
+private:
+    unsigned m_sizeType : 2;
+};
+
+}