[cfe-commits] r155690 - /cfe/trunk/test/SemaCXX/invalid-member-expr.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Apr 26 21:31:46 PDT 2012
Author: akirtzidis
Date: Thu Apr 26 23:31:46 2012
New Revision: 155690
URL: http://llvm.org/viewvc/llvm-project?rev=155690&view=rev
Log:
Add test case for rdar://11293995
Modified:
cfe/trunk/test/SemaCXX/invalid-member-expr.cpp
Modified: cfe/trunk/test/SemaCXX/invalid-member-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/invalid-member-expr.cpp?rev=155690&r1=155689&r2=155690&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/invalid-member-expr.cpp (original)
+++ cfe/trunk/test/SemaCXX/invalid-member-expr.cpp Thu Apr 26 23:31:46 2012
@@ -37,3 +37,34 @@
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;
+};
+
+}
More information about the cfe-commits
mailing list