[PATCH] Mangling of member-expressions involving anonymous unions.
Richard Smith
richard at metafoo.co.uk
Wed Nov 12 17:14:53 PST 2014
On Wed, Oct 29, 2014 at 2:26 PM, Tomasz Miąsko <tomasz.miasko at gmail.com>
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 (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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141112/2aa08d36/attachment.html>
More information about the cfe-commits
mailing list