[cfe-commits] [PATCH][Review request] - Anonymous union/struct redesign

John McCall rjmccall at apple.com
Sat Nov 20 21:43:42 PST 2010


On Nov 20, 2010, at 9:25 PM, Francois Pichet wrote:
> hi here is patch 3.. hoping this is the good one.

Looks good!  Just style requests now;  feel free to commit.

+protected:
+  IndirectFieldDecl(DeclContext *DC, SourceLocation L,
+                    DeclarationName N, QualType T,
+                    NamedDecl **CH, int CHS)
+    : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH), ChainingSize(CHS) {}
+

This can be private.

+      if ((isa<FieldDecl>(D) && Record->hasUserDeclaredConstructor()) ||
+          isa<IndirectFieldDecl>(D)) {
+       Diag(D->getLocation(), diag::err_member_name_of_class)
+         << D->getDeclName();
+       break;

Indentation.

+    IndirectFieldDecl *IndirectMemberDecl = 0;
+    if (!MemberDecl) {
+	    if (IndirectMemberDecl = R.getAsSingle<IndirectFieldDecl>())
+        MemberDecl = IndirectMemberDecl->getAnonField();
+    }
+

Spaces, not tabs.

John.



More information about the cfe-commits mailing list