[cfe-commits] r116103 - /cfe/trunk/lib/Frontend/DeclXML.cpp
Douglas Gregor
dgregor at apple.com
Fri Oct 8 14:05:46 PDT 2010
Author: dgregor
Date: Fri Oct 8 16:05:46 2010
New Revision: 116103
URL: http://llvm.org/viewvc/llvm-project?rev=116103&view=rev
Log:
Improve XML output for class/struct/union declarations, from Martin Vejnar!
Modified:
cfe/trunk/lib/Frontend/DeclXML.cpp
Modified: cfe/trunk/lib/Frontend/DeclXML.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/DeclXML.cpp?rev=116103&r1=116102&r2=116103&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/DeclXML.cpp (original)
+++ cfe/trunk/lib/Frontend/DeclXML.cpp Fri Oct 8 16:05:46 2010
@@ -38,21 +38,11 @@
}
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 @@
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) {
More information about the cfe-commits
mailing list