[med-svn] [Git][med-team/castxml][master] 7 commits: New upstream version 0.6.13
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Tue Oct 7 21:03:04 BST 2025
Étienne Mollier pushed to branch master at Debian Med / castxml
Commits:
75a61fc1 by Étienne Mollier at 2025-10-06T22:45:01+02:00
New upstream version 0.6.13
- - - - -
a871e5cd by Étienne Mollier at 2025-10-06T22:45:02+02:00
Update upstream source from tag 'upstream/0.6.13'
Update to upstream version '0.6.13'
with Debian dir dae9fcbcf65dddd6e9efa0cee2266c331db758cf
- - - - -
da2a6bf9 by Étienne Mollier at 2025-10-06T22:48:01+02:00
d/control: bump to llvm 21 tool chain.
- - - - -
92172186 by Étienne Mollier at 2025-10-06T22:48:42+02:00
d/control: declare compliance to standards version 4.7.2.
- - - - -
e6804eff by Étienne Mollier at 2025-10-06T22:49:00+02:00
d/control: drop redundant Rules-Requires-Root: no.
- - - - -
09ec902b by Étienne Mollier at 2025-10-06T22:51:04+02:00
d/watch: convert to v5 Github template.
- - - - -
5589d4fe by Étienne Mollier at 2025-10-07T22:02:38+02:00
d/changelog: ready for upload to unstable.
- - - - -
11 changed files:
- README.rst
- debian/changelog
- debian/control
- debian/watch
- src/Output.cxx
- src/RunClang.cxx
- src/Version.cmake
- test/cc-gnu.c
- test/expect/castxml1.any.Class-template-constructor-template.xml.txt
- test/expect/cmd.predefined-macros.stdout.txt.in
- test/expect/gccxml.any.Class-template-constructor-template.xml.txt
Changes:
=====================================
README.rst
=====================================
@@ -47,8 +47,9 @@ 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 2025-02-10 (``36530414e3``)
- - Git ``release/20.x`` as of 2025-02-10 (``75e20e0b80``)
+ - Release ``21.1``
+ - Git ``master`` as of 2025-06-12 (``46085d8f83``)
+ - Release ``20.1``
- Release ``19.1``
- Release ``18.1``
- Release ``17.0``
=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+castxml (0.6.13-1) unstable; urgency=medium
+
+ * New upstream version 0.6.13
+ * d/control: bump to llvm 21 tool chain.
+ * d/control: declare compliance to standards version 4.7.2.
+ * d/control: drop redundant Rules-Requires-Root: no.
+ * d/watch: convert to v5 Github template.
+
+ -- Étienne Mollier <emollier at debian.org> Mon, 06 Oct 2025 22:52:15 +0200
+
castxml (0.6.11-1) unstable; urgency=medium
* New upstream version 0.6.11
=====================================
debian/control
=====================================
@@ -7,21 +7,20 @@ Priority: optional
Build-Depends: debhelper-compat (= 13),
cmake,
help2man <!nodoc>,
- libclang-19-dev,
- llvm-19-dev,
- libmlir-19-dev,
- mlir-19-tools,
- clang-tools-19,
- clang-format-19,
- clang-tidy-19,
- clangd-19,
+ libclang-21-dev,
+ llvm-21-dev,
+ libmlir-21-dev,
+ mlir-21-tools,
+ clang-tools-21,
+ clang-format-21,
+ clang-tidy-21,
+ clangd-21,
libedit-dev,
zlib1g-dev
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
Vcs-Browser: https://salsa.debian.org/med-team/castxml
Vcs-Git: https://salsa.debian.org/med-team/castxml.git
Homepage: https://github.com/CastXML/CastXML
-Rules-Requires-Root: no
Package: castxml
Architecture: any
=====================================
debian/watch
=====================================
@@ -1,4 +1,5 @@
-version=4
-opts="mode=git,dversionmangle=auto" \
- https://github.com/CastXML/CastXML.git \
- refs/tags/v?([\d\.\d]+)
+Version: 5
+
+Template: Github
+Owner: CastXML
+Project: CastXML
=====================================
src/Output.cxx
=====================================
@@ -50,6 +50,10 @@
#include <string>
#include <vector>
+#if LLVM_VERSION_MAJOR >= 21
+# include "clang/AST/DeclOpenACC.h"
+#endif
+
#if LLVM_VERSION_MAJOR >= 16
# include <optional>
namespace cx {
@@ -2479,13 +2483,19 @@ void ASTVisitor::OutputRValueReferenceType(clang::RValueReferenceType const* t,
void ASTVisitor::OutputMemberPointerType(clang::MemberPointerType const* t,
DumpNode const* dn)
{
+ clang::Type const* c =
+#if LLVM_VERSION_MAJOR >= 21
+ t->getQualifier()->getAsType()
+#else
+ t->getClass()
+#endif
+ ;
if (t->isMemberDataPointerType()) {
- this->OutputOffsetType(t->getPointeeType(), t->getClass(), dn);
+ this->OutputOffsetType(t->getPointeeType(), c, dn);
} else {
this->OS << " <PointerType";
this->PrintIdAttribute(dn);
- DumpId id = this->AddTypeDumpNode(
- DumpType(t->getPointeeType(), t->getClass()), false);
+ DumpId id = this->AddTypeDumpNode(DumpType(t->getPointeeType(), c), false);
this->OS << " type=\"_" << id << "\"";
this->OS << "/>\n";
}
=====================================
src/RunClang.cxx
=====================================
@@ -197,6 +197,25 @@ public:
}
};
+#define UNDEF_FLT(x) \
+ "#undef __" #x "_DECIMAL_DIG__\n" \
+ "#undef __" #x "_DENORM_MIN__\n" \
+ "#undef __" #x "_DIG__\n" \
+ "#undef __" #x "_EPSILON__\n" \
+ "#undef __" #x "_HAS_DENORM__\n" \
+ "#undef __" #x "_HAS_INFINITY__\n" \
+ "#undef __" #x "_HAS_QUIET_NAN__\n" \
+ "#undef __" #x "_IS_IEC_60559__\n" \
+ "#undef __" #x "_MANT_DIG__\n" \
+ "#undef __" #x "_MAX_10_EXP__\n" \
+ "#undef __" #x "_MAX_EXP__\n" \
+ "#undef __" #x "_MAX__\n" \
+ "#undef __" #x "_MIN_10_EXP__\n" \
+ "#undef __" #x "_MIN_EXP__\n" \
+ "#undef __" #x "_MIN__\n" \
+ "#undef __" #x "_NORM_MAX__\n" \
+ ""
+
template <class T>
class CastXMLPredefines : public T
{
@@ -277,24 +296,13 @@ protected:
// Remove GCC builtin definitions for features Clang does not implement.
if (this->IsActualGNU(this->Opts.Predefines)) {
- builtins += "#undef __BFLT16_DECIMAL_DIG__\n"
- "#undef __BFLT16_DENORM_MIN__\n"
- "#undef __BFLT16_DIG__\n"
- "#undef __BFLT16_DIG__\n"
- "#undef __BFLT16_EPSILON__\n"
- "#undef __BFLT16_HAS_DENORM__\n"
- "#undef __BFLT16_HAS_INFINITY__\n"
- "#undef __BFLT16_HAS_QUIET_NAN__\n"
- "#undef __BFLT16_IS_IEC_60559__\n"
- "#undef __BFLT16_MANT_DIG__\n"
- "#undef __BFLT16_MAX_10_EXP__\n"
- "#undef __BFLT16_MAX_EXP__\n"
- "#undef __BFLT16_MAX__\n"
- "#undef __BFLT16_MIN_10_EXP__\n"
- "#undef __BFLT16_MIN_EXP__\n"
- "#undef __BFLT16_MIN__\n"
- "#undef __BFLT16_NORM_MAX__\n"
- "#undef __STDCPP_BFLOAT16_T__\n"
+ builtins += UNDEF_FLT(BFLT16);
+ builtins += UNDEF_FLT(FLT32);
+ builtins += UNDEF_FLT(FLT32X);
+ builtins += UNDEF_FLT(FLT64);
+ builtins += UNDEF_FLT(FLT64X);
+ builtins += UNDEF_FLT(FLT128);
+ builtins += "#undef __STDCPP_BFLOAT16_T__\n"
"#undef __STDCPP_FLOAT128_T__\n"
"#undef __STDCPP_FLOAT16_T__\n"
"#undef __STDCPP_FLOAT32_T__\n"
@@ -784,58 +792,56 @@ static bool runClangCI(clang::CompilerInstance* CI, Options const& opts)
}
}
-static llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine>
-runClangCreateDiagnostics(const char* const* argBeg, const char* const* argEnd)
+static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
+ Options const& opts)
{
+ // Construct a diagnostics engine for use while processing driver options.
+#if LLVM_VERSION_MAJOR >= 21
+ clang::DiagnosticOptions diagOpts;
+ clang::DiagnosticOptions& diagOptsRef = diagOpts;
+ clang::DiagnosticOptions& diagOptsPtr = diagOpts;
+#else
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> diagOpts(
new clang::DiagnosticOptions);
+ clang::DiagnosticOptions& diagOptsRef = *diagOpts;
+ clang::DiagnosticOptions* diagOptsPtr = &diagOptsRef;
+#endif
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> diagID(
new clang::DiagnosticIDs());
#if LLVM_VERSION_MAJOR >= 10
- llvm::opt::OptTable const* opts = &clang::driver::getDriverOptTable();
+ llvm::opt::OptTable const* driverOpts = &clang::driver::getDriverOptTable();
#else
- std::unique_ptr<llvm::opt::OptTable> opts(
+ std::unique_ptr<llvm::opt::OptTable> driverOpts(
clang::driver::createDriverOptTable());
#endif
unsigned missingArgIndex, missingArgCount;
#if LLVM_VERSION_MAJOR > 3 || \
LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7
- llvm::opt::InputArgList args(opts->ParseArgs(
+ llvm::opt::InputArgList args(driverOpts->ParseArgs(
# if LLVM_VERSION_MAJOR >= 16
llvm::ArrayRef(argBeg, argEnd),
# else
llvm::makeArrayRef(argBeg, argEnd),
# endif
missingArgIndex, missingArgCount));
- clang::ParseDiagnosticArgs(*diagOpts, args);
+ clang::ParseDiagnosticArgs(diagOptsRef, args);
#else
std::unique_ptr<llvm::opt::InputArgList> args(
- opts->ParseArgs(argBeg, argEnd, missingArgIndex, missingArgCount));
- clang::ParseDiagnosticArgs(*diagOpts, *args);
+ driverOpts->ParseArgs(argBeg, argEnd, missingArgIndex, missingArgCount));
+ clang::ParseDiagnosticArgs(diagOptsRef, *args);
#endif
- clang::TextDiagnosticPrinter* diagClient =
- new clang::TextDiagnosticPrinter(llvm::errs(), &*diagOpts);
- llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine> diags(
- new clang::DiagnosticsEngine(diagID, &*diagOpts, diagClient));
- clang::ProcessWarningOptions(*diags, *diagOpts,
+ clang::TextDiagnosticPrinter diagClient(llvm::errs(), diagOptsPtr);
+ clang::DiagnosticsEngine diags(diagID, diagOptsPtr, &diagClient,
+ /*ShouldOwnClient=*/false);
+ clang::ProcessWarningOptions(diags, diagOptsRef,
#if LLVM_VERSION_MAJOR >= 20
*llvm::vfs::getRealFileSystem(),
#endif
/*ReportDiags=*/false);
- return diags;
-}
-
-static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
- Options const& opts)
-{
- // Construct a diagnostics engine for use while processing driver options.
- llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine> diags =
- runClangCreateDiagnostics(argBeg, argEnd);
// Use the approach in clang::createInvocationFromCommandLine to
// get system compiler setting arguments from the Driver.
- clang::driver::Driver d("clang", llvm::sys::getDefaultTargetTriple(),
- *diags);
+ clang::driver::Driver d("clang", llvm::sys::getDefaultTargetTriple(), diags);
if (!llvm::sys::path::is_absolute(d.ResourceDir) ||
!llvm::sys::fs::is_directory(d.ResourceDir)) {
d.ResourceDir = getClangResourceDir();
@@ -853,7 +859,7 @@ static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
// Ask the driver to build the compiler commands for us.
std::unique_ptr<clang::driver::Compilation> c(d.BuildCompilation(cArgs));
- if (diags->hasErrorOccurred()) {
+ if (diags.hasErrorOccurred()) {
return 1;
}
@@ -865,7 +871,7 @@ static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
// Reject '-o' with multiple inputs.
if (!opts.OutputFile.empty() && c->getJobs().size() > 1) {
- diags->Report(clang::diag::err_drv_output_argument_with_multiple_files);
+ diags.Report(clang::diag::err_drv_output_argument_with_multiple_files);
return 1;
}
@@ -890,8 +896,8 @@ static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
#else
cmdArgBeg, cmdArgEnd,
#endif
- *diags)) {
- if (diags->hasErrorOccurred()) {
+ diags)) {
+ if (diags.hasErrorOccurred()) {
return 1;
}
result = runClangCI(CI.get(), opts) && result;
@@ -903,8 +909,8 @@ static int runClangImpl(const char* const* argBeg, const char* const* argEnd,
llvm::SmallString<128> buf;
llvm::raw_svector_ostream msg(buf);
job.Print(msg, "\n", true);
- diags->Report(clang::diag::err_fe_expected_clang_command);
- diags->Report(clang::diag::err_fe_expected_compiler_job) << msg.str();
+ diags.Report(clang::diag::err_fe_expected_clang_command);
+ diags.Report(clang::diag::err_fe_expected_compiler_job) << msg.str();
result = false;
}
}
=====================================
src/Version.cmake
=====================================
@@ -1,7 +1,7 @@
# CastXML version number components.
set(CastXML_VERSION_MAJOR 0)
set(CastXML_VERSION_MINOR 6)
-set(CastXML_VERSION_PATCH 11)
+set(CastXML_VERSION_PATCH 13)
#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 "f38c024 CastXML 0.6.11")
+set(git_info "13e1572 CastXML 0.6.13")
# 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/cc-gnu.c
=====================================
@@ -1,6 +1,25 @@
#include <stdio.h>
#include <string.h>
+#define DEFINE_FLT(x) \
+ "#define __" #x "_DECIMAL_DIG__\n" \
+ "#define __" #x "_DENORM_MIN__\n" \
+ "#define __" #x "_DIG__\n" \
+ "#define __" #x "_EPSILON__\n" \
+ "#define __" #x "_HAS_DENORM__\n" \
+ "#define __" #x "_HAS_INFINITY__\n" \
+ "#define __" #x "_HAS_QUIET_NAN__\n" \
+ "#define __" #x "_IS_IEC_60559__\n" \
+ "#define __" #x "_MANT_DIG__\n" \
+ "#define __" #x "_MAX_10_EXP__\n" \
+ "#define __" #x "_MAX_EXP__\n" \
+ "#define __" #x "_MAX__\n" \
+ "#define __" #x "_MIN_10_EXP__\n" \
+ "#define __" #x "_MIN_EXP__\n" \
+ "#define __" #x "_MIN__\n" \
+ "#define __" #x "_NORM_MAX__\n" \
+ ""
+
int main(int argc, const char* argv[])
{
int cpp = 0;
@@ -50,24 +69,13 @@ int main(int argc, const char* argv[])
"#define __has_last(x) x",
ver_major);
/* Test GCC builtin definitions for features Clang does not implement. */
+ fprintf(stdout, DEFINE_FLT(BFLT16));
+ fprintf(stdout, DEFINE_FLT(FLT32));
+ fprintf(stdout, DEFINE_FLT(FLT32X));
+ fprintf(stdout, DEFINE_FLT(FLT64));
+ fprintf(stdout, DEFINE_FLT(FLT64X));
+ fprintf(stdout, DEFINE_FLT(FLT128));
fprintf(stdout,
- "#define __BFLT16_DECIMAL_DIG__\n"
- "#define __BFLT16_DENORM_MIN__\n"
- "#define __BFLT16_DIG__\n"
- "#define __BFLT16_DIG__\n"
- "#define __BFLT16_EPSILON__\n"
- "#define __BFLT16_HAS_DENORM__\n"
- "#define __BFLT16_HAS_INFINITY__\n"
- "#define __BFLT16_HAS_QUIET_NAN__\n"
- "#define __BFLT16_IS_IEC_60559__\n"
- "#define __BFLT16_MANT_DIG__\n"
- "#define __BFLT16_MAX_10_EXP__\n"
- "#define __BFLT16_MAX_EXP__\n"
- "#define __BFLT16_MAX__\n"
- "#define __BFLT16_MIN_10_EXP__\n"
- "#define __BFLT16_MIN_EXP__\n"
- "#define __BFLT16_MIN__\n"
- "#define __BFLT16_NORM_MAX__\n"
"#define __STDCPP_BFLOAT16_T__\n"
"#define __STDCPP_FLOAT128_T__\n"
"#define __STDCPP_FLOAT16_T__\n"
=====================================
test/expect/castxml1.any.Class-template-constructor-template.xml.txt
=====================================
@@ -1,5 +1,16 @@
^<\?xml version="1.0"\?>
-<CastXML[^>]*>
+<CastXML[^>]*>(
+ <Class id="_1" name="start<int>" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5">
+ <Argument type="_6" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_4" name="=" returns="_7" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_6" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_5" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <ReferenceType id="_6" type="_1c" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_7" type="_1" size="[0-9]+" align="[0-9]+"/>|
<Class id="_1" name="start<int>" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
<Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5">
<Argument type="_7" location="f1:5" file="f1" line="5"/>
@@ -14,7 +25,7 @@
<ReferenceType id="_7" type="_1c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_1c" type="_1" const="1"/>
<ReferenceType id="_8" type="_1c" size="[0-9]+" align="[0-9]+"/>
- <ReferenceType id="_9" type="_1" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1" size="[0-9]+" align="[0-9]+"/>)
<Namespace id="_2" name="::"/>
<File id="f1" name=".*/test/input/Class-template-constructor-template.cxx"/>
</CastXML>$
=====================================
test/expect/cmd.predefined-macros.stdout.txt.in
=====================================
@@ -6,8 +6,8 @@
#define __castxml_major__ @CastXML_VERSION_MAJOR@
#define __castxml_minor__ @CastXML_VERSION_MINOR@
#define __castxml_patch__ @CastXML_VERSION_PATCH@(
-#define __cdecl [^
-]*)?
+#define __c[^
+]*)*
#define __clang__ 1(
#define __clang_literal_encoding__ [^
]*)?
=====================================
test/expect/gccxml.any.Class-template-constructor-template.xml.txt
=====================================
@@ -1,5 +1,16 @@
^<\?xml version="1.0"\?>
-<GCC_XML[^>]*>
+<GCC_XML[^>]*>(
+ <Class id="_1" name="start<int>" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5">
+ <Argument type="_6" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_4" name="=" returns="_7" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_6" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_5" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <ReferenceType id="_6" type="_1c" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_7" type="_1" size="[0-9]+" align="[0-9]+"/>|
<Class id="_1" name="start<int>" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
<Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5">
<Argument type="_7" location="f1:5" file="f1" line="5"/>
@@ -14,7 +25,7 @@
<ReferenceType id="_7" type="_1c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_1c" type="_1" const="1"/>
<ReferenceType id="_8" type="_1c" size="[0-9]+" align="[0-9]+"/>
- <ReferenceType id="_9" type="_1" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1" size="[0-9]+" align="[0-9]+"/>)
<Namespace id="_2" name="::"/>
<File id="f1" name=".*/test/input/Class-template-constructor-template.cxx"/>
</GCC_XML>$
View it on GitLab: https://salsa.debian.org/med-team/castxml/-/compare/138c4331ae22b1f870a3cd29e8e0747e36c0a3e0...5589d4fe2e3e5138f5924be281c3778ad5753393
--
View it on GitLab: https://salsa.debian.org/med-team/castxml/-/compare/138c4331ae22b1f870a3cd29e8e0747e36c0a3e0...5589d4fe2e3e5138f5924be281c3778ad5753393
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20251007/45bc4ecb/attachment-0001.htm>
More information about the debian-med-commit
mailing list