[cfe-commits] r167736 - in /cfe/trunk: lib/AST/StmtPrinter.cpp test/Sema/ast-print.c

Eli Friedman eli.friedman at gmail.com
Mon Nov 12 11:24:33 PST 2012


On Mon, Nov 12, 2012 at 11:12 AM, David Blaikie <dblaikie at gmail.com> wrote:
> Author: dblaikie
> Date: Mon Nov 12 13:12:12 2012
> New Revision: 167736
>
> URL: http://llvm.org/viewvc/llvm-project?rev=167736&view=rev
> Log:
> Correct printing of nested anonymous type member accesses.
>
> Patch by Florent Bruneau!
>
> Modified:
>     cfe/trunk/lib/AST/StmtPrinter.cpp
>     cfe/trunk/test/Sema/ast-print.c
>
> Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=167736&r1=167735&r2=167736&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
> +++ cfe/trunk/lib/AST/StmtPrinter.cpp Mon Nov 12 13:12:12 2012
> @@ -910,10 +910,18 @@
>  void StmtPrinter::VisitMemberExpr(MemberExpr *Node) {
>    // FIXME: Suppress printing implicit bases (like "this")
>    PrintExpr(Node->getBase());
> +
> +  MemberExpr *ParentMember = dyn_cast<MemberExpr>(Node->getBase());
> +  FieldDecl  *ParentDecl   = ParentMember ? dyn_cast<FieldDecl>(ParentMember->getMemberDecl()): NULL;

80 columns>

-Eli



More information about the cfe-commits mailing list