[med-svn] [castxml] 07/09: New upstream version 0.1+git20170823
Gert Wollny
gewo at moszumanska.debian.org
Mon Aug 28 11:02:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
gewo pushed a commit to branch master
in repository castxml.
commit 83da4ccc89bc0af59e4eac4f070d2e771cb14443
Author: Gert Wollny <gewo at debian.org>
Date: Thu Aug 24 08:23:41 2017 +0000
New upstream version 0.1+git20170823
---
src/Output.cxx | 36 +++++---
src/RunClang.cxx | 14 +++-
src/Utils.cxx | 18 ++--
src/Version.cmake | 2 +-
test/expect/castxml1.any.Elaborated.xml.txt | 88 ++++++++++----------
test/expect/castxml1.any.GNU-float128.xml.txt | 4 +-
test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt | 4 +-
test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt | 4 +-
test/expect/gccxml.any.Elaborated.xml.txt | 88 ++++++++++----------
test/expect/gccxml.any.GNU-float128.xml.txt | 4 +-
test/input/Elaborated.cxx | 97 ++++++++++++----------
11 files changed, 195 insertions(+), 164 deletions(-)
diff --git a/src/Output.cxx b/src/Output.cxx
index 4d37eab..0d8b815 100644
--- a/src/Output.cxx
+++ b/src/Output.cxx
@@ -31,6 +31,7 @@
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Basic/Specifiers.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/Support/raw_ostream.h"
@@ -499,6 +500,7 @@ class ASTVisitor : public ASTVisitorBase
void PrintContextAttribute(clang::Decl const* d,
clang::AccessSpecifier alt = clang::AS_none);
+ bool HaveFloat128Type() const;
void PrintFloat128Type(DumpNode const* dn);
// Decl node output methods.
@@ -540,7 +542,8 @@ class ASTVisitor : public ASTVisitorBase
void OutputOffsetType(clang::QualType t, clang::Type const* c,
DumpNode const* dn);
void OutputPointerType(clang::PointerType const* t, DumpNode const* dn);
- void OutputElaboratedType(clang::ElaboratedType const* t, DumpNode const* dn);
+ void OutputElaboratedType(clang::ElaboratedType const* t,
+ DumpNode const* dn);
/** Queue declarations matching given qualified name in given context. */
void LookupStart(clang::DeclContext const* dc, std::string const& name);
@@ -734,12 +737,12 @@ ASTVisitor::DumpId ASTVisitor::AddTypeDumpNode(DumpType dt, bool complete,
DumpType(t->getAs<clang::DecayedType>()->getDecayedType(), c),
complete, dq);
case clang::Type::Elaborated:
- if (this->Opts.GccXml || !t->isElaboratedTypeSpecifier()) {
- return this->AddTypeDumpNode(
- DumpType(t->getAs<clang::ElaboratedType>()->getNamedType(), c),
- complete, dq);
- }
- break;
+ if (this->Opts.GccXml || !t->isElaboratedTypeSpecifier()) {
+ return this->AddTypeDumpNode(
+ DumpType(t->getAs<clang::ElaboratedType>()->getNamedType(), c),
+ complete, dq);
+ }
+ break;
case clang::Type::Enum:
return this->AddDeclDumpNodeForType(
t->getAs<clang::EnumType>()->getDecl(), complete, dq);
@@ -1174,10 +1177,12 @@ void ASTVisitor::PrintMangledAttribute(clang::NamedDecl const* d)
this->MangleContext->mangleName(d, rso);
}
- // We cannot mangle __float128 correctly because Clang does not have
- // it as an internal type, so skip mangled attributes involving it.
- if (s.find("__float128") != s.npos) {
- s = "";
+ if (!this->HaveFloat128Type()) {
+ // We cannot mangle __float128 correctly because Clang does not have
+ // it as an internal type, so skip mangled attributes involving it.
+ if (s.find("__float128") != s.npos) {
+ s = "";
+ }
}
// Strip a leading 1 byte in MS mangling.
@@ -1485,6 +1490,15 @@ void ASTVisitor::PrintBefriendingAttribute(clang::CXXRecordDecl const* dx)
}
}
+bool ASTVisitor::HaveFloat128Type() const
+{
+#if LLVM_VERSION_MAJOR > 3 || LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 8
+ return this->CI.getTarget().hasFloat128Type();
+#else
+ return false;
+#endif
+}
+
void ASTVisitor::PrintFloat128Type(DumpNode const* dn)
{
this->OS << " <FundamentalType";
diff --git a/src/RunClang.cxx b/src/RunClang.cxx
index 37e8ac7..9259253 100644
--- a/src/RunClang.cxx
+++ b/src/RunClang.cxx
@@ -24,6 +24,7 @@
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
@@ -246,7 +247,8 @@ protected:
}
// Provide __float128 if simulating the actual GNU compiler.
- if (this->NeedFloat128(this->Opts.Predefines)) {
+ if (!this->HaveFloat128(CI) &&
+ this->NeedFloat128(this->Opts.Predefines)) {
// Clang provides its own (fake) builtin in gnu++11 mode but issues
// diagnostics when it is used in some contexts. Provide our own
// approximation of the builtin instead.
@@ -344,6 +346,16 @@ protected:
pd.find("#define __ia64__ ") != pd.npos));
}
+ bool HaveFloat128(clang::CompilerInstance const& CI) const
+ {
+#if LLVM_VERSION_MAJOR > 3 || LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 8
+ return CI.getTarget().hasFloat128Type();
+#else
+ static_cast<void>(CI);
+ return false;
+#endif
+ }
+
bool NeedNoMathInlines(std::string const& pd) const
{
return (this->IsActualGNU(pd) &&
diff --git a/src/Utils.cxx b/src/Utils.cxx
index be5e7b1..0cfc5c0 100644
--- a/src/Utils.cxx
+++ b/src/Utils.cxx
@@ -121,7 +121,7 @@ bool runCommand(int argc, const char* const* argv, int& ret, std::string& out,
// Create a temporary directory to hold output files.
llvm::SmallString<128> tmpDir;
if (std::error_code e =
- llvm::sys::fs::createUniqueDirectory("castxml", tmpDir)) {
+ llvm::sys::fs::createUniqueDirectory("castxml", tmpDir)) {
msg = e.message();
return false;
}
@@ -143,17 +143,17 @@ bool runCommand(int argc, const char* const* argv, int& ret, std::string& out,
cmd.push_back(0);
// Actually run the command.
- ret = llvm::sys::ExecuteAndWait(prog, &*cmd.begin(), nullptr, redirects,
- 0, 0, &msg, nullptr);
+ ret = llvm::sys::ExecuteAndWait(prog, &*cmd.begin(), nullptr, redirects, 0,
+ 0, &msg, nullptr);
// Load the output from the temporary files.
{
- std::ifstream fout(outFile.str());
- std::ifstream ferr(errFile.str());
- out.assign(std::istreambuf_iterator<char>(fout),
- std::istreambuf_iterator<char>());
- err.assign(std::istreambuf_iterator<char>(ferr),
- std::istreambuf_iterator<char>());
+ std::ifstream fout(outFile.str());
+ std::ifstream ferr(errFile.str());
+ out.assign(std::istreambuf_iterator<char>(fout),
+ std::istreambuf_iterator<char>());
+ err.assign(std::istreambuf_iterator<char>(ferr),
+ std::istreambuf_iterator<char>());
}
// Remove temporary files and directory.
diff --git a/src/Version.cmake b/src/Version.cmake
index 4aad16b..33fc2ba 100644
--- a/src/Version.cmake
+++ b/src/Version.cmake
@@ -39,7 +39,7 @@ elseif(COMMAND _git)
set(CastXML_VERSION "${CastXML_VERSION}-git")
endif()
endif()
-elseif("fab9c47" MATCHES "^([0-9a-f]+)$")
+elseif("927c739" MATCHES "^([0-9a-f]+)$")
# Use version exported by 'git archive'.
set(CastXML_VERSION "${CastXML_VERSION}-g${CMAKE_MATCH_1}")
else()
diff --git a/test/expect/castxml1.any.Elaborated.xml.txt b/test/expect/castxml1.any.Elaborated.xml.txt
index 0d8ff15..61362f8 100644
--- a/test/expect/castxml1.any.Elaborated.xml.txt
+++ b/test/expect/castxml1.any.Elaborated.xml.txt
@@ -9,41 +9,41 @@
<Typedef id="_8" name="s5" type="_35" context="_1" location="f1:10" file="f1" line="10"/>
<Typedef id="_9" name="s6" type="_36" context="_1" location="f1:11" file="f1" line="11"/>
<Enumeration id="_10" name="Foo2" context="_1" location="f1:14" file="f1" line="14" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_11" name="e1" type="_39" context="_1" location="f1:16" file="f1" line="16" mangled="[^"]+"/>
- <Variable id="_12" name="e2" type="_40" context="_1" location="f1:17" file="f1" line="17" mangled="[^"]+"/>
- <Variable id="_13" name="e3" type="_41" context="_1" location="f1:18" file="f1" line="18" mangled="[^"]+"/>
- <Variable id="_14" name="e4" type="_42" context="_1" location="f1:19" file="f1" line="19" mangled="[^"]+"/>
- <Typedef id="_15" name="e5" type="_39" context="_1" location="f1:20" file="f1" line="20"/>
- <Typedef id="_16" name="e6" type="_40" context="_1" location="f1:21" file="f1" line="21"/>
- <Union id="_17" name="Foo3" context="_1" location="f1:24" file="f1" line="24" members="_43 _44 _45 _46" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_18" name="u1" type="_47" context="_1" location="f1:26" file="f1" line="26" mangled="[^"]+"/>
- <Variable id="_19" name="u2" type="_48" context="_1" location="f1:27" file="f1" line="27" mangled="[^"]+"/>
- <Variable id="_20" name="u3" type="_49" context="_1" location="f1:28" file="f1" line="28" mangled="[^"]+"/>
- <Variable id="_21" name="u4" type="_50" context="_1" location="f1:29" file="f1" line="29" mangled="[^"]+"/>
- <Typedef id="_22" name="u5" type="_47" context="_1" location="f1:30" file="f1" line="30"/>
- <Typedef id="_23" name="u6" type="_48" context="_1" location="f1:31" file="f1" line="31"/>
- <Class id="_24" name="Foo4" context="_1" location="f1:34" file="f1" line="34" members="_51 _52 _53 _54" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_25" name="c1" type="_55" context="_1" location="f1:36" file="f1" line="36" mangled="[^"]+"/>
- <Variable id="_26" name="c2" type="_56" context="_1" location="f1:37" file="f1" line="37" mangled="[^"]+"/>
- <Variable id="_27" name="c3" type="_49" context="_1" location="f1:38" file="f1" line="38" mangled="[^"]+"/>
- <Variable id="_28" name="c4" type="_57" context="_1" location="f1:39" file="f1" line="39" mangled="[^"]+"/>
- <Typedef id="_29" name="c5" type="_55" context="_1" location="f1:40" file="f1" line="40"/>
- <Typedef id="_30" name="c6" type="_56" context="_1" location="f1:41" file="f1" line="41"/>
- <Function id="_31" name="func1" returns="_58" context="_1" location="f1:44" file="f1" line="44" mangled="[^"]+">
- <Argument name="a1" type="_35" location="f1:44" file="f1" line="44"/>
- <Argument name="a2" type="_36" location="f1:44" file="f1" line="44"/>
+ <Variable id="_11" name="e1" type="_39" context="_1" location="f1:18" file="f1" line="18" mangled="[^"]+"/>
+ <Variable id="_12" name="e2" type="_40" context="_1" location="f1:19" file="f1" line="19" mangled="[^"]+"/>
+ <Variable id="_13" name="e3" type="_41" context="_1" location="f1:20" file="f1" line="20" mangled="[^"]+"/>
+ <Variable id="_14" name="e4" type="_42" context="_1" location="f1:21" file="f1" line="21" mangled="[^"]+"/>
+ <Typedef id="_15" name="e5" type="_39" context="_1" location="f1:22" file="f1" line="22"/>
+ <Typedef id="_16" name="e6" type="_40" context="_1" location="f1:23" file="f1" line="23"/>
+ <Union id="_17" name="Foo3" context="_1" location="f1:26" file="f1" line="26" members="_43 _44 _45 _46" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_18" name="u1" type="_47" context="_1" location="f1:30" file="f1" line="30" mangled="[^"]+"/>
+ <Variable id="_19" name="u2" type="_48" context="_1" location="f1:31" file="f1" line="31" mangled="[^"]+"/>
+ <Variable id="_20" name="u3" type="_49" context="_1" location="f1:32" file="f1" line="32" mangled="[^"]+"/>
+ <Variable id="_21" name="u4" type="_50" context="_1" location="f1:33" file="f1" line="33" mangled="[^"]+"/>
+ <Typedef id="_22" name="u5" type="_47" context="_1" location="f1:34" file="f1" line="34"/>
+ <Typedef id="_23" name="u6" type="_48" context="_1" location="f1:35" file="f1" line="35"/>
+ <Class id="_24" name="Foo4" context="_1" location="f1:38" file="f1" line="38" members="_51 _52 _53 _54" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_25" name="c1" type="_55" context="_1" location="f1:42" file="f1" line="42" mangled="[^"]+"/>
+ <Variable id="_26" name="c2" type="_56" context="_1" location="f1:43" file="f1" line="43" mangled="[^"]+"/>
+ <Variable id="_27" name="c3" type="_49" context="_1" location="f1:44" file="f1" line="44" mangled="[^"]+"/>
+ <Variable id="_28" name="c4" type="_57" context="_1" location="f1:45" file="f1" line="45" mangled="[^"]+"/>
+ <Typedef id="_29" name="c5" type="_55" context="_1" location="f1:46" file="f1" line="46"/>
+ <Typedef id="_30" name="c6" type="_56" context="_1" location="f1:47" file="f1" line="47"/>
+ <Function id="_31" name="func1" returns="_58" context="_1" location="f1:50" file="f1" line="50" mangled="[^"]+">
+ <Argument name="a1" type="_35" location="f1:50" file="f1" line="50"/>
+ <Argument name="a2" type="_36" location="f1:50" file="f1" line="50"/>
</Function>
- <Function id="_32" name="func2" returns="_58" context="_1" location="f1:45" file="f1" line="45" mangled="[^"]+">
- <Argument name="a3" type="_39" location="f1:45" file="f1" line="45"/>
- <Argument name="a4" type="_40" location="f1:45" file="f1" line="45"/>
+ <Function id="_32" name="func2" returns="_58" context="_1" location="f1:51" file="f1" line="51" mangled="[^"]+">
+ <Argument name="a3" type="_39" location="f1:51" file="f1" line="51"/>
+ <Argument name="a4" type="_40" location="f1:51" file="f1" line="51"/>
</Function>
- <Function id="_33" name="func3" returns="_58" context="_1" location="f1:46" file="f1" line="46" mangled="[^"]+">
- <Argument name="a5" type="_47" location="f1:46" file="f1" line="46"/>
- <Argument name="a6" type="_48" location="f1:46" file="f1" line="46"/>
+ <Function id="_33" name="func3" returns="_58" context="_1" location="f1:52" file="f1" line="52" mangled="[^"]+">
+ <Argument name="a5" type="_47" location="f1:52" file="f1" line="52"/>
+ <Argument name="a6" type="_48" location="f1:52" file="f1" line="52"/>
</Function>
- <Function id="_34" name="func4" returns="_58" context="_1" location="f1:47" file="f1" line="47" mangled="[^"]+">
- <Argument name="a7" type="_55" location="f1:47" file="f1" line="47"/>
- <Argument name="a8" type="_56" location="f1:47" file="f1" line="47"/>
+ <Function id="_34" name="func4" returns="_58" context="_1" location="f1:53" file="f1" line="53" mangled="[^"]+">
+ <Argument name="a7" type="_55" location="f1:53" file="f1" line="53"/>
+ <Argument name="a8" type="_56" location="f1:53" file="f1" line="53"/>
</Function>
<PointerType id="_35" type="_3" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_36" type="_59" size="[0-9]+" align="[0-9]+"/>
@@ -55,27 +55,27 @@
<PointerType id="_41" type="_10c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_10c" type="_10" const="1"/>
<PointerType id="_42" type="_60c" size="[0-9]+" align="[0-9]+"/>
- <Constructor id="_43" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?/>
- <Constructor id="_44" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?>
- <Argument type="_61" location="f1:24" file="f1" line="24"/>
+ <Constructor id="_43" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_44" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?>
+ <Argument type="_61" location="f1:26" file="f1" line="26"/>
</Constructor>
- <OperatorMethod id="_45" name="=" returns="_62" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")? mangled="[^"]+">
- <Argument type="_61" location="f1:24" file="f1" line="24"/>
+ <OperatorMethod id="_45" name="=" returns="_62" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_61" location="f1:26" file="f1" line="26"/>
</OperatorMethod>
- <Destructor id="_46" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?/>
+ <Destructor id="_46" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?/>
<PointerType id="_47" type="_17" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_48" type="_63" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_49" type="_17c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_17c" type="_17" const="1"/>
<PointerType id="_50" type="_63c" size="[0-9]+" align="[0-9]+"/>
- <Constructor id="_51" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?/>
- <Constructor id="_52" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?>
- <Argument type="_64" location="f1:34" file="f1" line="34"/>
+ <Constructor id="_51" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_52" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?>
+ <Argument type="_64" location="f1:38" file="f1" line="38"/>
</Constructor>
- <OperatorMethod id="_53" name="=" returns="_65" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")? mangled="[^"]+">
- <Argument type="_64" location="f1:34" file="f1" line="34"/>
+ <OperatorMethod id="_53" name="=" returns="_65" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_64" location="f1:38" file="f1" line="38"/>
</OperatorMethod>
- <Destructor id="_54" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?/>
+ <Destructor id="_54" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?/>
<PointerType id="_55" type="_24" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_56" type="_66" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_57" type="_66c" size="[0-9]+" align="[0-9]+"/>
diff --git a/test/expect/castxml1.any.GNU-float128.xml.txt b/test/expect/castxml1.any.GNU-float128.xml.txt
index 8d41d58..12b8e3c 100644
--- a/test/expect/castxml1.any.GNU-float128.xml.txt
+++ b/test/expect/castxml1.any.GNU-float128.xml.txt
@@ -1,10 +1,10 @@
^<\?xml version="1.0"\?>
<CastXML[^>]*>
<Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
- <Function id="_3" name="f" returns="_6" context="_1" location="f1:4" file="f1" line="4" mangled="">
+ <Function id="_3" name="f" returns="_6" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]*">
<Argument type="_6" location="f1:4" file="f1" line="4"/>
</Function>
- <Variable id="_4" name="v" type="_6" init="" context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/>
+ <Variable id="_4" name="v" type="_6"( init="")? context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/>
<Variable id="_5" name="pa" type="_7" context="_1" location="f1:6" file="f1" line="6" mangled="[^"]*"/>
<FundamentalType id="_6" name="__float128" size="128" align="128"/>
<PointerType id="_7" type="_8" size="[0-9]+" align="[0-9]+"/>
diff --git a/test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt b/test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt
index aac6988..9ebdd11 100644
--- a/test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt
+++ b/test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt
@@ -7,6 +7,6 @@
#define __castxml__ [0-9]+
#define __castxml_clang_major__ [0-9]+
#define __castxml_clang_minor__ [0-9]+
-#define __castxml_clang_patchlevel__ [0-9]+
-#define __float128 __castxml__float128
+#define __castxml_clang_patchlevel__ [0-9]+(
+#define __float128 __castxml__float128)?
#define __i386__ 1$
diff --git a/test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt b/test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt
index 2fbf8e5..54df9be 100644
--- a/test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt
+++ b/test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt
@@ -8,6 +8,6 @@
#define __castxml_clang_major__ [0-9]+
#define __castxml_clang_minor__ [0-9]+
#define __castxml_clang_patchlevel__ [0-9]+
-#define __cplusplus 199711L
-#define __float128 __castxml__float128
+#define __cplusplus 199711L(
+#define __float128 __castxml__float128)?
#define __i386__ 1$
diff --git a/test/expect/gccxml.any.Elaborated.xml.txt b/test/expect/gccxml.any.Elaborated.xml.txt
index fa186b5..253f0cc 100644
--- a/test/expect/gccxml.any.Elaborated.xml.txt
+++ b/test/expect/gccxml.any.Elaborated.xml.txt
@@ -9,41 +9,41 @@
<Typedef id="_8" name="s5" type="_35" context="_1" location="f1:10" file="f1" line="10"/>
<Typedef id="_9" name="s6" type="_36" context="_1" location="f1:11" file="f1" line="11"/>
<Enumeration id="_10" name="Foo2" context="_1" location="f1:14" file="f1" line="14" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_11" name="e1" type="_39" context="_1" location="f1:16" file="f1" line="16" mangled="[^"]+"/>
- <Variable id="_12" name="e2" type="_40" context="_1" location="f1:17" file="f1" line="17" mangled="[^"]+"/>
- <Variable id="_13" name="e3" type="_41" context="_1" location="f1:18" file="f1" line="18" mangled="[^"]+"/>
- <Variable id="_14" name="e4" type="_42" context="_1" location="f1:19" file="f1" line="19" mangled="[^"]+"/>
- <Typedef id="_15" name="e5" type="_39" context="_1" location="f1:20" file="f1" line="20"/>
- <Typedef id="_16" name="e6" type="_40" context="_1" location="f1:21" file="f1" line="21"/>
- <Union id="_17" name="Foo3" context="_1" location="f1:24" file="f1" line="24" members="_43 _44 _45 _46" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_18" name="u1" type="_47" context="_1" location="f1:26" file="f1" line="26" mangled="[^"]+"/>
- <Variable id="_19" name="u2" type="_48" context="_1" location="f1:27" file="f1" line="27" mangled="[^"]+"/>
- <Variable id="_20" name="u3" type="_49" context="_1" location="f1:28" file="f1" line="28" mangled="[^"]+"/>
- <Variable id="_21" name="u4" type="_50" context="_1" location="f1:29" file="f1" line="29" mangled="[^"]+"/>
- <Typedef id="_22" name="u5" type="_47" context="_1" location="f1:30" file="f1" line="30"/>
- <Typedef id="_23" name="u6" type="_48" context="_1" location="f1:31" file="f1" line="31"/>
- <Class id="_24" name="Foo4" context="_1" location="f1:34" file="f1" line="34" members="_51 _52 _53 _54" size="[0-9]+" align="[0-9]+"/>
- <Variable id="_25" name="c1" type="_55" context="_1" location="f1:36" file="f1" line="36" mangled="[^"]+"/>
- <Variable id="_26" name="c2" type="_56" context="_1" location="f1:37" file="f1" line="37" mangled="[^"]+"/>
- <Variable id="_27" name="c3" type="_49" context="_1" location="f1:38" file="f1" line="38" mangled="[^"]+"/>
- <Variable id="_28" name="c4" type="_57" context="_1" location="f1:39" file="f1" line="39" mangled="[^"]+"/>
- <Typedef id="_29" name="c5" type="_55" context="_1" location="f1:40" file="f1" line="40"/>
- <Typedef id="_30" name="c6" type="_56" context="_1" location="f1:41" file="f1" line="41"/>
- <Function id="_31" name="func1" returns="_58" context="_1" location="f1:44" file="f1" line="44" mangled="[^"]+">
- <Argument name="a1" type="_35" location="f1:44" file="f1" line="44"/>
- <Argument name="a2" type="_36" location="f1:44" file="f1" line="44"/>
+ <Variable id="_11" name="e1" type="_39" context="_1" location="f1:18" file="f1" line="18" mangled="[^"]+"/>
+ <Variable id="_12" name="e2" type="_40" context="_1" location="f1:19" file="f1" line="19" mangled="[^"]+"/>
+ <Variable id="_13" name="e3" type="_41" context="_1" location="f1:20" file="f1" line="20" mangled="[^"]+"/>
+ <Variable id="_14" name="e4" type="_42" context="_1" location="f1:21" file="f1" line="21" mangled="[^"]+"/>
+ <Typedef id="_15" name="e5" type="_39" context="_1" location="f1:22" file="f1" line="22"/>
+ <Typedef id="_16" name="e6" type="_40" context="_1" location="f1:23" file="f1" line="23"/>
+ <Union id="_17" name="Foo3" context="_1" location="f1:26" file="f1" line="26" members="_43 _44 _45 _46" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_18" name="u1" type="_47" context="_1" location="f1:30" file="f1" line="30" mangled="[^"]+"/>
+ <Variable id="_19" name="u2" type="_48" context="_1" location="f1:31" file="f1" line="31" mangled="[^"]+"/>
+ <Variable id="_20" name="u3" type="_49" context="_1" location="f1:32" file="f1" line="32" mangled="[^"]+"/>
+ <Variable id="_21" name="u4" type="_50" context="_1" location="f1:33" file="f1" line="33" mangled="[^"]+"/>
+ <Typedef id="_22" name="u5" type="_47" context="_1" location="f1:34" file="f1" line="34"/>
+ <Typedef id="_23" name="u6" type="_48" context="_1" location="f1:35" file="f1" line="35"/>
+ <Class id="_24" name="Foo4" context="_1" location="f1:38" file="f1" line="38" members="_51 _52 _53 _54" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_25" name="c1" type="_55" context="_1" location="f1:42" file="f1" line="42" mangled="[^"]+"/>
+ <Variable id="_26" name="c2" type="_56" context="_1" location="f1:43" file="f1" line="43" mangled="[^"]+"/>
+ <Variable id="_27" name="c3" type="_49" context="_1" location="f1:44" file="f1" line="44" mangled="[^"]+"/>
+ <Variable id="_28" name="c4" type="_57" context="_1" location="f1:45" file="f1" line="45" mangled="[^"]+"/>
+ <Typedef id="_29" name="c5" type="_55" context="_1" location="f1:46" file="f1" line="46"/>
+ <Typedef id="_30" name="c6" type="_56" context="_1" location="f1:47" file="f1" line="47"/>
+ <Function id="_31" name="func1" returns="_58" context="_1" location="f1:50" file="f1" line="50" mangled="[^"]+">
+ <Argument name="a1" type="_35" location="f1:50" file="f1" line="50"/>
+ <Argument name="a2" type="_36" location="f1:50" file="f1" line="50"/>
</Function>
- <Function id="_32" name="func2" returns="_58" context="_1" location="f1:45" file="f1" line="45" mangled="[^"]+">
- <Argument name="a3" type="_39" location="f1:45" file="f1" line="45"/>
- <Argument name="a4" type="_40" location="f1:45" file="f1" line="45"/>
+ <Function id="_32" name="func2" returns="_58" context="_1" location="f1:51" file="f1" line="51" mangled="[^"]+">
+ <Argument name="a3" type="_39" location="f1:51" file="f1" line="51"/>
+ <Argument name="a4" type="_40" location="f1:51" file="f1" line="51"/>
</Function>
- <Function id="_33" name="func3" returns="_58" context="_1" location="f1:46" file="f1" line="46" mangled="[^"]+">
- <Argument name="a5" type="_47" location="f1:46" file="f1" line="46"/>
- <Argument name="a6" type="_48" location="f1:46" file="f1" line="46"/>
+ <Function id="_33" name="func3" returns="_58" context="_1" location="f1:52" file="f1" line="52" mangled="[^"]+">
+ <Argument name="a5" type="_47" location="f1:52" file="f1" line="52"/>
+ <Argument name="a6" type="_48" location="f1:52" file="f1" line="52"/>
</Function>
- <Function id="_34" name="func4" returns="_58" context="_1" location="f1:47" file="f1" line="47" mangled="[^"]+">
- <Argument name="a7" type="_55" location="f1:47" file="f1" line="47"/>
- <Argument name="a8" type="_56" location="f1:47" file="f1" line="47"/>
+ <Function id="_34" name="func4" returns="_58" context="_1" location="f1:53" file="f1" line="53" mangled="[^"]+">
+ <Argument name="a7" type="_55" location="f1:53" file="f1" line="53"/>
+ <Argument name="a8" type="_56" location="f1:53" file="f1" line="53"/>
</Function>
<PointerType id="_35" type="_3" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_36" type="_3" size="[0-9]+" align="[0-9]+"/>
@@ -55,27 +55,27 @@
<PointerType id="_41" type="_10c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_10c" type="_10" const="1"/>
<PointerType id="_42" type="_10c" size="[0-9]+" align="[0-9]+"/>
- <Constructor id="_43" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?/>
- <Constructor id="_44" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?>
- <Argument type="_59" location="f1:24" file="f1" line="24"/>
+ <Constructor id="_43" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_44" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?>
+ <Argument type="_59" location="f1:26" file="f1" line="26"/>
</Constructor>
- <OperatorMethod id="_45" name="=" returns="_60" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")? mangled="[^"]+">
- <Argument type="_59" location="f1:24" file="f1" line="24"/>
+ <OperatorMethod id="_45" name="=" returns="_60" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_59" location="f1:26" file="f1" line="26"/>
</OperatorMethod>
- <Destructor id="_46" name="Foo3" context="_17" access="public" location="f1:24" file="f1" line="24" inline="1" artificial="1"( throw="")?/>
+ <Destructor id="_46" name="Foo3" context="_17" access="public" location="f1:26" file="f1" line="26" inline="1" artificial="1"( throw="")?/>
<PointerType id="_47" type="_17" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_48" type="_17" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_49" type="_17c" size="[0-9]+" align="[0-9]+"/>
<CvQualifiedType id="_17c" type="_17" const="1"/>
<PointerType id="_50" type="_17c" size="[0-9]+" align="[0-9]+"/>
- <Constructor id="_51" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?/>
- <Constructor id="_52" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?>
- <Argument type="_61" location="f1:34" file="f1" line="34"/>
+ <Constructor id="_51" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_52" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?>
+ <Argument type="_61" location="f1:38" file="f1" line="38"/>
</Constructor>
- <OperatorMethod id="_53" name="=" returns="_62" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")? mangled="[^"]+">
- <Argument type="_61" location="f1:34" file="f1" line="34"/>
+ <OperatorMethod id="_53" name="=" returns="_62" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_61" location="f1:38" file="f1" line="38"/>
</OperatorMethod>
- <Destructor id="_54" name="Foo4" context="_24" access="public" location="f1:34" file="f1" line="34" inline="1" artificial="1"( throw="")?/>
+ <Destructor id="_54" name="Foo4" context="_24" access="public" location="f1:38" file="f1" line="38" inline="1" artificial="1"( throw="")?/>
<PointerType id="_55" type="_24" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_56" type="_24" size="[0-9]+" align="[0-9]+"/>
<PointerType id="_57" type="_24c" size="[0-9]+" align="[0-9]+"/>
diff --git a/test/expect/gccxml.any.GNU-float128.xml.txt b/test/expect/gccxml.any.GNU-float128.xml.txt
index 9873ab4..689a1e1 100644
--- a/test/expect/gccxml.any.GNU-float128.xml.txt
+++ b/test/expect/gccxml.any.GNU-float128.xml.txt
@@ -1,10 +1,10 @@
^<\?xml version="1.0"\?>
<GCC_XML[^>]*>
<Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
- <Function id="_3" name="f" returns="_6" context="_1" location="f1:4" file="f1" line="4" mangled="">
+ <Function id="_3" name="f" returns="_6" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]*">
<Argument type="_6" location="f1:4" file="f1" line="4"/>
</Function>
- <Variable id="_4" name="v" type="_6" init="" context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/>
+ <Variable id="_4" name="v" type="_6"( init="")? context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/>
<Variable id="_5" name="pa" type="_7" context="_1" location="f1:6" file="f1" line="6" mangled="[^"]*"/>
<FundamentalType id="_6" name="__float128" size="128" align="128"/>
<PointerType id="_7" type="_8" size="[0-9]+" align="[0-9]+"/>
diff --git a/test/input/Elaborated.cxx b/test/input/Elaborated.cxx
index d77e812..ce98ab9 100644
--- a/test/input/Elaborated.cxx
+++ b/test/input/Elaborated.cxx
@@ -1,49 +1,54 @@
namespace start {
- // Struct
- struct Foo1;
-
- Foo1 *s1;
- struct Foo1 *s2; // elaborated
- const Foo1 *s3;
- const struct Foo1 *s4; // elaborated
- typedef Foo1 *s5;
- typedef struct Foo1 *s6; // elaborated
-
- // Enum
- enum Foo2 { };
-
- Foo2 *e1;
- enum Foo2 *e2; // elaborated
- const Foo2 *e3;
- const enum Foo2 *e4; // elaborated
- typedef Foo2 *e5;
- typedef enum Foo2 *e6; // elaborated
-
- // Union
- union Foo3 {};
-
- Foo3 *u1;
- union Foo3 *u2; // elaborated
- const Foo3 *u3;
- const union Foo3 *u4; // elaborated
- typedef Foo3 *u5;
- typedef union Foo3 *u6; // elaborated
-
- // Class
- class Foo4 {};
-
- Foo4 *c1;
- class Foo4 *c2; // elaborated
- const Foo3 *c3;
- const class Foo4 *c4; // elaborated
- typedef Foo4 *c5;
- typedef class Foo4 *c6; // elaborated
-
- // Function arguments
- void func1(Foo1 *a1, struct Foo1 *a2);
- void func2(Foo2 *a3, enum Foo2 *a4);
- void func3(Foo3 *a5, union Foo3 *a6);
- void func4(Foo4 *a7, class Foo4 *a8);
-
+// Struct
+struct Foo1;
+
+Foo1* s1;
+struct Foo1* s2; // elaborated
+const Foo1* s3;
+const struct Foo1* s4; // elaborated
+typedef Foo1* s5;
+typedef struct Foo1* s6; // elaborated
+
+// Enum
+enum Foo2
+{
+};
+
+Foo2* e1;
+enum Foo2* e2; // elaborated
+const Foo2* e3;
+const enum Foo2* e4; // elaborated
+typedef Foo2* e5;
+typedef enum Foo2* e6; // elaborated
+
+// Union
+union Foo3
+{
+};
+
+Foo3* u1;
+union Foo3* u2; // elaborated
+const Foo3* u3;
+const union Foo3* u4; // elaborated
+typedef Foo3* u5;
+typedef union Foo3* u6; // elaborated
+
+// Class
+class Foo4
+{
+};
+
+Foo4* c1;
+class Foo4* c2; // elaborated
+const Foo3* c3;
+const class Foo4* c4; // elaborated
+typedef Foo4* c5;
+typedef class Foo4* c6; // elaborated
+
+// Function arguments
+void func1(Foo1* a1, struct Foo1* a2);
+void func2(Foo2* a3, enum Foo2* a4);
+void func3(Foo3* a5, union Foo3* a6);
+void func4(Foo4* a7, class Foo4* a8);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/castxml.git
More information about the debian-med-commit
mailing list