From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- lib/Frontend/DeclXML.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'lib/Frontend/DeclXML.cpp') diff --git a/lib/Frontend/DeclXML.cpp b/lib/Frontend/DeclXML.cpp index 97a7f55..8d3d225 100644 --- a/lib/Frontend/DeclXML.cpp +++ b/lib/Frontend/DeclXML.cpp @@ -38,10 +38,12 @@ class DocumentXML::DeclPrinter : public DeclVisitor { } void addSubNodes(RecordDecl* RD) { - for (RecordDecl::field_iterator i = RD->field_begin(), - e = RD->field_end(); i != e; ++i) { - Visit(*i); - Doc.toParent(); + for (RecordDecl::decl_iterator i = RD->decls_begin(), + e = RD->decls_end(); i != e; ++i) { + if (!(*i)->isImplicit()) { + Visit(*i); + Doc.toParent(); + } } } @@ -71,15 +73,7 @@ class DocumentXML::DeclPrinter : public DeclVisitor { Doc.addAttribute("is_virtual", base->isVirtual()); Doc.toParent(); } - - for (CXXRecordDecl::method_iterator i = RD->method_begin(), - e = RD->method_end(); i != e; ++i) { - Visit(*i); - Doc.toParent(); - } - } - } void addSubNodes(EnumDecl* ED) { @@ -110,7 +104,7 @@ class DocumentXML::DeclPrinter : public DeclVisitor { Doc.PrintStmt(argDecl->getDefaultArg()); } - void addSubNodes(NamespaceDecl* ns) { + void addSubNodes(DeclContext* ns) { for (DeclContext::decl_iterator d = ns->decls_begin(), -- cgit v1.1