[med-svn] [Git][med-team/castxml][master] 3 commits: New upstream version 0.8.0
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Thu Nov 5 20:27:21 GMT 2026
Étienne Mollier pushed to branch master at Debian Med / castxml
Commits:
a28a8c32 by Étienne Mollier at 2026-11-05T16:45:58+01:00
New upstream version 0.8.0
- - - - -
c2c59239 by Étienne Mollier at 2026-11-05T16:45:58+01:00
Update upstream source from tag 'upstream/0.8.0'
Update to upstream version '0.8.0'
with Debian dir a2a5d9c5209c81437cbb0c3fbf28e01875294134
- - - - -
3ebc2034 by Étienne Mollier at 2026-11-05T16:49:23+01:00
d/changelog: ready for upload to unstable.
- - - - -
9 changed files:
- CMakeLists.txt
- README.rst
- debian/changelog
- doc/manual/castxml.1.rst
- doc/manual/castxml.xsd
- src/Output.cxx
- src/Version.cmake
- test/expect/castxml1.any.using-declaration-class.xml.txt
- test/expect/castxml1.c++98.using-declaration-class.xml.txt
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -142,7 +142,8 @@ if(MSVC)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -STACK:10000000")
endif()
-add_definitions(${LLVM_DEFINITIONS})
+separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
+add_definitions(${LLVM_DEFINITIONS_LIST})
include_directories(${CLANG_INCLUDE_DIRS})
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
=====================================
README.rst
=====================================
@@ -47,7 +47,8 @@ To build CastXML from source, first obtain the prerequisites:
* `LLVM/Clang`_ compiler SDK install tree built using the C++ compiler.
This version of CastXML has been tested with LLVM/Clang
- - Git ``master`` as of 2026-02-10 (``22c6b7047b``)
+ - Git ``main`` as of 2026-09-23 (``3bd7ee0215``)
+ - Release ``23.1``
- Release ``22.1``
- Release ``21.1``
- Release ``20.1``
=====================================
debian/changelog
=====================================
@@ -1,10 +1,11 @@
-castxml (0.7.0-2) UNRELEASED; urgency=medium
+castxml (0.8.0-1) unstable; urgency=medium
+ * New upstream version 0.8.0
* 0003_libatomic.patch: document the bug reported upstream.
* d/control: declare compliance to standards version 4.7.4.
* d/control: bump to debhelper-compat 14.
- -- Étienne Mollier <emollier at debian.org> Thu, 09 Jul 2026 22:48:44 +0200
+ -- Étienne Mollier <emollier at debian.org> Thu, 05 Nov 2026 16:47:38 +0100
castxml (0.7.0-1) unstable; urgency=medium
=====================================
doc/manual/castxml.1.rst
=====================================
@@ -105,7 +105,7 @@ The XML root element tag will be of the form:
.. code-block:: xml
- <CastXML format="1.4.0">
+ <CastXML format="1.4.1">
* The first component is the ``epic`` format version number given to the
``--castxml-output=<v>`` flag, and currently must always be ``1``.
=====================================
doc/manual/castxml.xsd
=====================================
@@ -49,6 +49,18 @@
</xs:restriction>
</xs:simpleType>
+ <!-- A list of IDREFs, each prefixed by its access specifier
+ unless that is public. -->
+ <xs:simpleType name="access-prefixed-ids">
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:pattern value="(private:|protected:)?_[0-9]+" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+
<xs:simpleType name="elaboration-keyword">
<xs:restriction base="xs:token">
<xs:enumeration value="enum" />
@@ -171,17 +183,8 @@
<!-- All of the following attributes are for complete declarations only. -->
<xs:attribute name="abstract" type="xs:int" use="optional" fixed="1" />
<xs:attribute name="members" type="xs:IDREFS" use="optional" />
- <xs:attribute name="bases" use="optional">
- <xs:simpleType>
- <xs:list>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:pattern value="(private:|protected:)?_[0-9]+" />
- </xs:restriction>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="bases" type="access-prefixed-ids" use="optional" />
+ <xs:attribute name="usings" type="access-prefixed-ids" use="optional" />
<xs:attribute name="befriending" type="xs:IDREFS" use="optional" />
<xs:attributeGroup ref="optionalAbi" />
<xs:attribute name="attributes" type="attributes" use="optional" />
=====================================
src/Output.cxx
=====================================
@@ -48,6 +48,7 @@
#include <queue>
#include <set>
#include <string>
+#include <utility>
#include <vector>
#if LLVM_VERSION_MAJOR >= 21
@@ -119,6 +120,10 @@ clang::NestedNameSpecifier const& deref(NestedNameSpecifier const& nns)
# define isPureVirtual isPure
#endif
+#if LLVM_VERSION_MAJOR < 23
+# define getRawCommentNoCache getRawCommentForDeclNoCache
+#endif
+
class ASTVisitorBase
{
protected:
@@ -553,6 +558,13 @@ class ASTVisitor : public ASTVisitorBase
for later output. */
void PrintBasesAttribute(clang::CXXRecordDecl const* dx);
+ /** Print a usings="..." attribute listing the XML IDREFs named by
+ the class-scope using declarations of the given class type, each
+ prefixed by the access specifier the using declaration gives it
+ unless that is public. Also queues the referenced declarations
+ for later output. */
+ void PrintUsingsAttribute(clang::CXXRecordDecl const* dx);
+
/** Print an attributes="..." attribute listing the given attributes. */
void PrintAttributesAttribute(std::vector<std::string> const& attrs);
@@ -1833,6 +1845,42 @@ void ASTVisitor::PrintBasesAttribute(clang::CXXRecordDecl const* dx)
this->OS << "\"";
}
+void ASTVisitor::PrintUsingsAttribute(clang::CXXRecordDecl const* dx)
+{
+ std::vector<std::pair<clang::AccessSpecifier, DumpId>> usings;
+ for (clang::Decl const* d : dx->decls()) {
+ // This also covers ConstructorUsingShadowDecl for inherited
+ // constructors.
+ if (clang::UsingShadowDecl const* shadow =
+ clang::dyn_cast<clang::UsingShadowDecl>(d)) {
+ if (DumpId id = this->AddDeclDumpNode(shadow, true)) {
+ usings.push_back(std::make_pair(shadow->getAccess(), id));
+ }
+ }
+ }
+ if (usings.empty()) {
+ return;
+ }
+ this->OS << " usings=\"";
+ char const* sep = "";
+ for (std::pair<clang::AccessSpecifier, DumpId> const& u : usings) {
+ this->OS << sep;
+ sep = " ";
+ switch (u.first) {
+ case clang::AS_private:
+ this->OS << "private:";
+ break;
+ case clang::AS_protected:
+ this->OS << "protected:";
+ break;
+ default:
+ break;
+ }
+ this->OS << "_" << u.second;
+ }
+ this->OS << "\"";
+}
+
void ASTVisitor::PrintAttributesAttribute(
std::vector<std::string> const& attrs)
{
@@ -1973,7 +2021,7 @@ void ASTVisitor::PrintCommentAttribute(clang::Decl const* d,
if (!this->Opts.CastXml) {
return;
}
- if (clang::RawComment const* rc = this->CTX.getRawCommentForDeclNoCache(d)) {
+ if (clang::RawComment const* rc = this->CTX.getRawCommentNoCache(d)) {
unsigned int index = ++this->CommentCount;
CommentEntry e = { index, rc, dn };
this->CommentQueue.push(e);
@@ -2301,6 +2349,10 @@ void ASTVisitor::OutputRecordDecl(clang::RecordDecl const* d,
if (doBases) {
this->PrintBasesAttribute(dx);
}
+ // The gccxml format reproduces gccxml 0.9 and has no such attribute.
+ if (dx && this->Opts.CastXml) {
+ this->PrintUsingsAttribute(dx);
+ }
this->PrintBefriendingAttribute(dx);
}
} else {
@@ -2797,7 +2849,7 @@ void ASTVisitor::OutputStartXMLTags()
// Start dump with castxml-compatible format.
/* clang-format off */
this->OS <<
- "<CastXML format=\"" << Opts.CastXmlEpicFormatVersion << ".4.0\">\n"
+ "<CastXML format=\"" << Opts.CastXmlEpicFormatVersion << ".4.1\">\n"
;
/* clang-format on */
} else if (this->Opts.GccXml) {
=====================================
src/Version.cmake
=====================================
@@ -1,6 +1,6 @@
# CastXML version number components.
set(CastXML_VERSION_MAJOR 0)
-set(CastXML_VERSION_MINOR 7)
+set(CastXML_VERSION_MINOR 8)
set(CastXML_VERSION_PATCH 0)
#set(CastXML_VERSION_RC 0)
set(CastXML_VERSION_IS_DIRTY 0)
@@ -13,7 +13,7 @@ if(DEFINED CastXML_VERSION_RC)
endif()
# If this source was exported by 'git archive', use its commit info.
-set(git_info "2d52b47c CastXML 0.7.0")
+set(git_info "6ebb3df6 CastXML 0.8.0")
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
=====================================
test/expect/castxml1.any.using-declaration-class.xml.txt
=====================================
@@ -1,6 +1,6 @@
^<\?xml version="1.0"\?>
<CastXML[^>]*>
- <Class id="_1" name="start" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7 _8 _9 _10" bases="_11" size="[0-9]+" align="[0-9]+">
+ <Class id="_1" name="start" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7 _8 _9 _10" bases="_11" usings="private:_3" size="[0-9]+" align="[0-9]+">
<Base type="_11" access="public" virtual="0" offset="0"/>
</Class>
<Method id="_3" name="f" returns="_12" context="_11" access="protected" location="f1:4" file="f1" line="4" mangled="[^"]+">
=====================================
test/expect/castxml1.c++98.using-declaration-class.xml.txt
=====================================
@@ -1,6 +1,6 @@
^<\?xml version="1.0"\?>
<CastXML[^>]*>
- <Class id="_1" name="start" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7 _8" bases="_9" size="[0-9]+" align="[0-9]+">
+ <Class id="_1" name="start" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7 _8" bases="_9" usings="private:_3" size="[0-9]+" align="[0-9]+">
<Base type="_9" access="public" virtual="0" offset="0"/>
</Class>
<Method id="_3" name="f" returns="_10" context="_9" access="protected" location="f1:4" file="f1" line="4" mangled="[^"]+">
View it on GitLab: https://salsa.debian.org/med-team/castxml/-/compare/fb930c1a993353a2c5d98c6847726c30d5f4fdef...3ebc20345290108dece656934edfdf830ed30331
--
View it on GitLab: https://salsa.debian.org/med-team/castxml/-/compare/fb930c1a993353a2c5d98c6847726c30d5f4fdef...3ebc20345290108dece656934edfdf830ed30331
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261105/2a567917/attachment-0001.htm>
More information about the debian-med-commit
mailing list