Hi, this patch does what the subject says, in particular, for the
following code

    extern "C" void foo();

the declaration of `foo` will be included in the resulting XML.
-- 
Martin
Index: include/clang/Frontend/DeclXML.def
===================================================================
--- include/clang/Frontend/DeclXML.def	(revision 116402)
+++ include/clang/Frontend/DeclXML.def	(working copy)
@@ -320,6 +320,7 @@
 	  ENUM_XML(LinkageSpecDecl::lang_c, "C")
 	  ENUM_XML(LinkageSpecDecl::lang_cxx, "CXX")
   END_ENUM_XML
+  SUB_NODE_XML(DeclContext)
 END_NODE_XML
 
 NODE_XML(TemplateDecl, "Template")
Index: lib/Frontend/DeclXML.cpp
===================================================================
--- lib/Frontend/DeclXML.cpp	(revision 116402)
+++ lib/Frontend/DeclXML.cpp	(working copy)
@@ -104,7 +104,7 @@
       Doc.PrintStmt(argDecl->getDefaultArg());
   }
 
-  void addSubNodes(NamespaceDecl* ns) {
+  void addSubNodes(DeclContext* ns) {
 
     for (DeclContext::decl_iterator 
            d    = ns->decls_begin(), 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to