/// If so, this cannot be contained in arrays or other structs as a member.
bool HasFlexibleArrayMember : 1;
- ///
+ /// AnonymousStructOrUnion - Whether this is the type of an
+ /// anonymous struct or union.
bool AnonymousStructOrUnion : 1;
protected:
if (SCS.CopyConstructor) {
// FIXME: Create a temporary object by calling the copy
// constructor.
- ImpCastExprToType(From, ToType);
+ ImpCastExprToType(From, ToType.getNonReferenceType(),
+ ToType->isReferenceType());
return false;
}
break;
case ICK_Qualification:
- ImpCastExprToType(From, ToType);
+ ImpCastExprToType(From, ToType.getNonReferenceType(),
+ ToType->isReferenceType());
break;
default:
// RUN: clang -fsyntax-only -verify %s
-
enum E {
Val1,
Val2
E e = Val1;
float& fr = enumerator_type(Val2);
}
+
+// <rdar://problem/6502934>
+typedef enum Foo {
+ A = 0,
+ B = 1
+} Foo;
+
+
+void bar() {
+ Foo myvar = A;
+ myvar = B;
+}
f(0); // expected-error{{non-static member 'f' found in multiple base-class subobjects of type 'struct A'}}
static_f(0); // okay
- // FIXME: should work E e = D::enumerator; // okay
+ E e = enumerator; // okay
type t = 0; // okay
- // FIXME: E2 e2 = D::enumerator2; // okay
+ E2 e2 = enumerator2; // okay
E3 e3; // expected-error{{member 'E3' found in multiple base classes of different types}}
}