On Wed, Nov 12, 2014 at 5:14 PM, Richard Smith <[email protected]> wrote:
> On Wed, Oct 29, 2014 at 2:26 PM, Tomasz Miąsko <[email protected]> > wrote: > >> I have updated tests to include an anonymous union, an anonymous struct >> and >> combinations of those two. In addition, dependency on non-diagnosed >> incomplete >> type in member-expression has been removed. >> >> End condition is now made more explicit using IndirectFieldDecl, but this >> requires additional check ensuring that we are in fact dealing with an >> anonymous union / struct (so that we don't break non-anonymous case). Did >> you >> have something simpler in mind here? > > > I was thinking of something like: > > while (base is anonymous struct or union) { > base = cast<MemberExpr>(base->getBase()); > isArrow = base->isArrow(); > } > > ... but what you have here is fine > Actually, scratch that. It looks like your approach will break if you change your testcase: struct X { struct { int i; }; }; How about just if (!member) return mangleExpression(base); ? > (especially since we don't have a nice way to write "is anonymous struct > or union" for a type). Do you need someone to commit this for you? > > http://reviews.llvm.org/D5997 >> >> Files: >> lib/AST/ItaniumMangle.cpp >> test/CodeGenCXX/mangle-exprs.cpp >> > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
