diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-08 21:05:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-08 21:05:46 +0000 |
commit | be4092138f2a431691cdf4906053ae63dda0c7fa (patch) | |
tree | ad93a2cb7918cf7bdc4ad49acb6cff8d7fdaf8c0 /clang/lib/Frontend/DeclXML.cpp | |
parent | 63b0a1e9fb9d7b19110c6d3393a44e06755e17e3 (diff) | |
download | bcm5719-llvm-be4092138f2a431691cdf4906053ae63dda0c7fa.tar.gz bcm5719-llvm-be4092138f2a431691cdf4906053ae63dda0c7fa.zip |
Improve XML output for class/struct/union declarations, from Martin Vejnar!
llvm-svn: 116103
Diffstat (limited to 'clang/lib/Frontend/DeclXML.cpp')
-rw-r--r-- | clang/lib/Frontend/DeclXML.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/clang/lib/Frontend/DeclXML.cpp b/clang/lib/Frontend/DeclXML.cpp index 3b600ffd2f4..c688ed043e8 100644 --- a/clang/lib/Frontend/DeclXML.cpp +++ b/clang/lib/Frontend/DeclXML.cpp @@ -38,21 +38,11 @@ class DocumentXML::DeclPrinter : public DeclVisitor<DocumentXML::DeclPrinter> { } 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) { - Decl *d = *i; - if (isa<RecordDecl>(d)) { - RecordDecl* pRec = cast<RecordDecl>(d); - if (pRec->isDefinition()) { - Visit(pRec); - Doc.toParent(); - } + if (!(*i)->isImplicit()) { + Visit(*i); + Doc.toParent(); } } } @@ -83,15 +73,7 @@ class DocumentXML::DeclPrinter : public DeclVisitor<DocumentXML::DeclPrinter> { 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) { |