From 0a10370aedd3cc08ebe2a8c0909406859058e146 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 May 2015 09:21:41 -0400 Subject: Output: Add mangled="" attributes to function and variable decls The gccxml output format includes mangled="" attributes on almost all elements. Clang only defines mangling for function and variable declarations. Add mangled attributes to castxml output where possible. --- src/Output.cxx | 33 +++++++++++++++++++++- test/expect/gccxml.any.Class-abstract.xml.txt | 6 ++-- test/expect/gccxml.any.Class-base-typedef.xml.txt | 4 +-- test/expect/gccxml.any.Class-forward.xml.txt | 2 +- test/expect/gccxml.any.Class-friends.xml.txt | 4 +-- ...ny.Class-implicit-member-access-mutable.xml.txt | 2 +- ...gccxml.any.Class-implicit-member-access.xml.txt | 2 +- .../gccxml.any.Class-implicit-member-array.xml.txt | 2 +- .../gccxml.any.Class-implicit-members.xml.txt | 4 +-- .../gccxml.any.Class-member-template.xml.txt | 4 +-- ...y.Class-partial-template-member-Typedef.xml.txt | 4 +-- ...ny.Class-template-Method-Argument-const.xml.txt | 6 ++-- ....Class-template-Method-Argument-default.xml.txt | 4 +-- ....any.Class-template-Method-return-const.xml.txt | 6 ++-- ...any.Class-template-constructor-template.xml.txt | 2 +- .../gccxml.any.Class-template-friends.xml.txt | 4 +-- ...any.Class-template-member-Typedef-const.xml.txt | 4 +-- ...ccxml.any.Class-template-member-Typedef.xml.txt | 4 +-- ...cxml.any.Class-template-member-template.xml.txt | 4 +-- test/expect/gccxml.any.Class-template.xml.txt | 4 +-- test/expect/gccxml.any.Class.xml.txt | 2 +- test/expect/gccxml.any.Field.xml.txt | 2 +- .../gccxml.any.Function-Argument-decay.xml.txt | 2 +- .../gccxml.any.Function-Argument-default.xml.txt | 2 +- ...cxml.any.Function-calling-convention-ms.xml.txt | 8 +++--- .../gccxml.any.Function-rvalue-reference.xml.txt | 2 +- test/expect/gccxml.any.Function-template.xml.txt | 4 +-- test/expect/gccxml.any.Function-throw.xml.txt | 2 +- test/expect/gccxml.any.Function-variadic.xml.txt | 2 +- test/expect/gccxml.any.Function.xml.txt | 2 +- test/expect/gccxml.any.GNU-float128.xml.txt | 4 +-- .../gccxml.any.Method-rvalue-reference.xml.txt | 4 +-- test/expect/gccxml.any.Method.xml.txt | 4 +-- .../gccxml.any.Namespace-Class-members.xml.txt | 4 +-- .../gccxml.any.Namespace-extern-C-members.xml.txt | 2 +- .../gccxml.any.Namespace-repeat-start.xml.txt | 4 +-- test/expect/gccxml.any.Namespace-repeat.xml.txt | 4 +-- test/expect/gccxml.any.OperatorFunction.xml.txt | 2 +- test/expect/gccxml.any.OperatorMethod.xml.txt | 4 +-- test/expect/gccxml.any.Variable-in-Class.xml.txt | 4 +-- test/expect/gccxml.any.Variable-init.xml.txt | 4 +-- test/expect/gccxml.any.Variable.xml.txt | 2 +- test/expect/gccxml.any.implicit-decl-ms.xml.txt | 2 +- test/expect/gccxml.any.inline-asm-ms.xml.txt | 2 +- .../gccxml.any.using-declaration-class.xml.txt | 8 +++--- ...ken.any.ReferenceType-to-Class-template.xml.txt | 6 ++-- test/expect/gccxml.c++11.Class-bases.xml.txt | 8 +++--- .../gccxml.c++11.Class-template-bases.xml.txt | 6 ++-- test/expect/gccxml.c++98.Class-bases.xml.txt | 8 +++--- .../gccxml.c++98.Class-template-bases.xml.txt | 6 ++-- test/expect/gccxml.c89.GNU-float128.xml.txt | 2 +- test/run.cmake | 1 + 52 files changed, 128 insertions(+), 96 deletions(-) diff --git a/src/Output.cxx b/src/Output.cxx index e19c4a7..374f1c3 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -25,6 +25,7 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclOpenMP.h" #include "clang/AST/DeclTemplate.h" +#include "clang/AST/Mangle.h" #include "clang/Basic/Specifiers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/Preprocessor.h" @@ -300,6 +301,9 @@ class ASTVisitor: public ASTVisitorBase /** Print a name="..." attribute. */ void PrintNameAttribute(std::string const& name); + /** Print a mangled="..." attribute. */ + void PrintMangledAttribute(clang::NamedDecl const* d); + /** Print an offset="..." attribute. */ void PrintOffsetAttribute(unsigned int const& offset); @@ -449,6 +453,9 @@ private: // Whether we are in the complete or incomplete output step. bool RequireComplete; + // Mangling context for target ABI. + std::unique_ptr MangleContext; + // Map from clang AST declaration node to our dump status node. typedef std::map DeclNodesMap; DeclNodesMap DeclNodes; @@ -480,7 +487,8 @@ public: Opts(opts), NodeCount(0), FileCount(0), FileBuiltin(false), - RequireComplete(true) {} + RequireComplete(true), + MangleContext(ctx.createMangleContext()) {} /** Visit declarations in the given translation unit. This is the main entry point. */ @@ -988,6 +996,24 @@ void ASTVisitor::PrintNameAttribute(std::string const& name) } //---------------------------------------------------------------------------- +void ASTVisitor::PrintMangledAttribute(clang::NamedDecl const* d) +{ + // Compute the mangled name. + std::string s; + { + llvm::raw_string_ostream rso(s); + this->MangleContext->mangleName(d, rso); + } + + // Strip a leading 1 byte in MS mangling. + if (!s.empty() && s[0] == '\1') { + s = s.substr(1); + } + + this->OS << " mangled=\"" << encodeXML(s) << "\""; +} + +//---------------------------------------------------------------------------- void ASTVisitor::PrintOffsetAttribute(unsigned int const& offset) { this->OS << " offset=\"" << offset << "\""; @@ -1238,6 +1264,10 @@ void ASTVisitor::OutputFunctionHelper(clang::FunctionDecl const* d, d->getType()->getAs()) { this->PrintFunctionTypeAttributes(fpt); this->PrintThrowsAttribute(fpt, dn->Complete); + if (!clang::isa(d) && + !clang::isa(d)) { + this->PrintMangledAttribute(d); + } } if(unsigned np = d->getNumParams()) { @@ -1521,6 +1551,7 @@ void ASTVisitor::OutputVarDecl(clang::VarDecl const* d, DumpNode const* dn) if(d->getStorageClass() == clang::SC_Extern) { this->OS << " extern=\"1\""; } + this->PrintMangledAttribute(d); this->OS << "/>\n"; } diff --git a/test/expect/gccxml.any.Class-abstract.xml.txt b/test/expect/gccxml.any.Class-abstract.xml.txt index 336e014..b018e22 100644 --- a/test/expect/gccxml.any.Class-abstract.xml.txt +++ b/test/expect/gccxml.any.Class-abstract.xml.txt @@ -1,12 +1,12 @@ ^<\?xml version="1.0"\?> ]*> - + - + - + diff --git a/test/expect/gccxml.any.Class-base-typedef.xml.txt b/test/expect/gccxml.any.Class-base-typedef.xml.txt index 1c143ad..d0fd46f 100644 --- a/test/expect/gccxml.any.Class-base-typedef.xml.txt +++ b/test/expect/gccxml.any.Class-base-typedef.xml.txt @@ -7,7 +7,7 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/test/expect/gccxml.any.Class-forward.xml.txt b/test/expect/gccxml.any.Class-forward.xml.txt index 1b7be75..59c4902 100644 --- a/test/expect/gccxml.any.Class-forward.xml.txt +++ b/test/expect/gccxml.any.Class-forward.xml.txt @@ -5,7 +5,7 @@ - + diff --git a/test/expect/gccxml.any.Class-friends.xml.txt b/test/expect/gccxml.any.Class-friends.xml.txt index ace95cd..e68a4fa 100644 --- a/test/expect/gccxml.any.Class-friends.xml.txt +++ b/test/expect/gccxml.any.Class-friends.xml.txt @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ - + diff --git a/test/expect/gccxml.any.Class-implicit-member-access-mutable.xml.txt b/test/expect/gccxml.any.Class-implicit-member-access-mutable.xml.txt index 9b98f75..d64e0ec 100644 --- a/test/expect/gccxml.any.Class-implicit-member-access-mutable.xml.txt +++ b/test/expect/gccxml.any.Class-implicit-member-access-mutable.xml.txt @@ -11,7 +11,7 @@ - + diff --git a/test/expect/gccxml.any.Class-implicit-member-access.xml.txt b/test/expect/gccxml.any.Class-implicit-member-access.xml.txt index 6483804..7a842cd 100644 --- a/test/expect/gccxml.any.Class-implicit-member-access.xml.txt +++ b/test/expect/gccxml.any.Class-implicit-member-access.xml.txt @@ -11,7 +11,7 @@ - + diff --git a/test/expect/gccxml.any.Class-implicit-member-array.xml.txt b/test/expect/gccxml.any.Class-implicit-member-array.xml.txt index 1310ad6..e6ce58d 100644 --- a/test/expect/gccxml.any.Class-implicit-member-array.xml.txt +++ b/test/expect/gccxml.any.Class-implicit-member-array.xml.txt @@ -6,7 +6,7 @@ - + diff --git a/test/expect/gccxml.any.Class-implicit-members.xml.txt b/test/expect/gccxml.any.Class-implicit-members.xml.txt index 6a2115f..53da7d6 100644 --- a/test/expect/gccxml.any.Class-implicit-members.xml.txt +++ b/test/expect/gccxml.any.Class-implicit-members.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Class-member-template.xml.txt b/test/expect/gccxml.any.Class-member-template.xml.txt index 01bf425..cff74d1 100644 --- a/test/expect/gccxml.any.Class-member-template.xml.txt +++ b/test/expect/gccxml.any.Class-member-template.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Class-partial-template-member-Typedef.xml.txt b/test/expect/gccxml.any.Class-partial-template-member-Typedef.xml.txt index a3d8c18..8ff1557 100644 --- a/test/expect/gccxml.any.Class-partial-template-member-Typedef.xml.txt +++ b/test/expect/gccxml.any.Class-partial-template-member-Typedef.xml.txt @@ -2,14 +2,14 @@ ]*> - + - + diff --git a/test/expect/gccxml.any.Class-template-Method-Argument-const.xml.txt b/test/expect/gccxml.any.Class-template-Method-Argument-const.xml.txt index c4e288c..d9bc600 100644 --- a/test/expect/gccxml.any.Class-template-Method-Argument-const.xml.txt +++ b/test/expect/gccxml.any.Class-template-Method-Argument-const.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + - + diff --git a/test/expect/gccxml.any.Class-template-Method-Argument-default.xml.txt b/test/expect/gccxml.any.Class-template-Method-Argument-default.xml.txt index b5dd76c..bf4bce1 100644 --- a/test/expect/gccxml.any.Class-template-Method-Argument-default.xml.txt +++ b/test/expect/gccxml.any.Class-template-Method-Argument-default.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Class-template-Method-return-const.xml.txt b/test/expect/gccxml.any.Class-template-Method-return-const.xml.txt index cbb3c76..080ecfe 100644 --- a/test/expect/gccxml.any.Class-template-Method-return-const.xml.txt +++ b/test/expect/gccxml.any.Class-template-Method-return-const.xml.txt @@ -1,12 +1,12 @@ ^<\?xml version="1.0"\?> ]*> - - + + - + diff --git a/test/expect/gccxml.any.Class-template-constructor-template.xml.txt b/test/expect/gccxml.any.Class-template-constructor-template.xml.txt index b9a8e1f..44eba24 100644 --- a/test/expect/gccxml.any.Class-template-constructor-template.xml.txt +++ b/test/expect/gccxml.any.Class-template-constructor-template.xml.txt @@ -7,7 +7,7 @@ - + diff --git a/test/expect/gccxml.any.Class-template-friends.xml.txt b/test/expect/gccxml.any.Class-template-friends.xml.txt index 837a162..3f3f7a2 100644 --- a/test/expect/gccxml.any.Class-template-friends.xml.txt +++ b/test/expect/gccxml.any.Class-template-friends.xml.txt @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ - + diff --git a/test/expect/gccxml.any.Class-template-member-Typedef-const.xml.txt b/test/expect/gccxml.any.Class-template-member-Typedef-const.xml.txt index e6e4c73..8cb9712 100644 --- a/test/expect/gccxml.any.Class-template-member-Typedef-const.xml.txt +++ b/test/expect/gccxml.any.Class-template-member-Typedef-const.xml.txt @@ -2,14 +2,14 @@ ]*> - + - + diff --git a/test/expect/gccxml.any.Class-template-member-Typedef.xml.txt b/test/expect/gccxml.any.Class-template-member-Typedef.xml.txt index d687249..d5927f8 100644 --- a/test/expect/gccxml.any.Class-template-member-Typedef.xml.txt +++ b/test/expect/gccxml.any.Class-template-member-Typedef.xml.txt @@ -2,14 +2,14 @@ ]*> - + - + diff --git a/test/expect/gccxml.any.Class-template-member-template.xml.txt b/test/expect/gccxml.any.Class-template-member-template.xml.txt index b7f565e..8c8967a 100644 --- a/test/expect/gccxml.any.Class-template-member-template.xml.txt +++ b/test/expect/gccxml.any.Class-template-member-template.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Class-template.xml.txt b/test/expect/gccxml.any.Class-template.xml.txt index ccec63f..dc688ce 100644 --- a/test/expect/gccxml.any.Class-template.xml.txt +++ b/test/expect/gccxml.any.Class-template.xml.txt @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@ - + diff --git a/test/expect/gccxml.any.Class.xml.txt b/test/expect/gccxml.any.Class.xml.txt index 6c87c6f..f534c0a 100644 --- a/test/expect/gccxml.any.Class.xml.txt +++ b/test/expect/gccxml.any.Class.xml.txt @@ -5,7 +5,7 @@ - + diff --git a/test/expect/gccxml.any.Field.xml.txt b/test/expect/gccxml.any.Field.xml.txt index c967c77..3354c8c 100644 --- a/test/expect/gccxml.any.Field.xml.txt +++ b/test/expect/gccxml.any.Field.xml.txt @@ -7,7 +7,7 @@ - + diff --git a/test/expect/gccxml.any.Function-Argument-decay.xml.txt b/test/expect/gccxml.any.Function-Argument-decay.xml.txt index 133cffe..53a0f21 100644 --- a/test/expect/gccxml.any.Function-Argument-decay.xml.txt +++ b/test/expect/gccxml.any.Function-Argument-decay.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.Function-Argument-default.xml.txt b/test/expect/gccxml.any.Function-Argument-default.xml.txt index ce29f8d..7bb944c 100644 --- a/test/expect/gccxml.any.Function-Argument-default.xml.txt +++ b/test/expect/gccxml.any.Function-Argument-default.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt b/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt index 6115014..2a0a1b3 100644 --- a/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt +++ b/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt @@ -1,15 +1,15 @@ ^<\?xml version="1.0"\?> ]*> - + - + - + - + diff --git a/test/expect/gccxml.any.Function-rvalue-reference.xml.txt b/test/expect/gccxml.any.Function-rvalue-reference.xml.txt index 6930590..062d5f4 100644 --- a/test/expect/gccxml.any.Function-rvalue-reference.xml.txt +++ b/test/expect/gccxml.any.Function-rvalue-reference.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.Function-template.xml.txt b/test/expect/gccxml.any.Function-template.xml.txt index e41bd3d..f74aaba 100644 --- a/test/expect/gccxml.any.Function-template.xml.txt +++ b/test/expect/gccxml.any.Function-template.xml.txt @@ -1,9 +1,9 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Function-throw.xml.txt b/test/expect/gccxml.any.Function-throw.xml.txt index 43c21cf..7a873c5 100644 --- a/test/expect/gccxml.any.Function-throw.xml.txt +++ b/test/expect/gccxml.any.Function-throw.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.Function-variadic.xml.txt b/test/expect/gccxml.any.Function-variadic.xml.txt index c7565e1..35fc46a 100644 --- a/test/expect/gccxml.any.Function-variadic.xml.txt +++ b/test/expect/gccxml.any.Function-variadic.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.Function.xml.txt b/test/expect/gccxml.any.Function.xml.txt index 54d9efe..4db302e 100644 --- a/test/expect/gccxml.any.Function.xml.txt +++ b/test/expect/gccxml.any.Function.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.GNU-float128.xml.txt b/test/expect/gccxml.any.GNU-float128.xml.txt index d21678f..bfcf0da 100644 --- a/test/expect/gccxml.any.GNU-float128.xml.txt +++ b/test/expect/gccxml.any.GNU-float128.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + @@ -10,7 +10,7 @@ - + diff --git a/test/expect/gccxml.any.Method-rvalue-reference.xml.txt b/test/expect/gccxml.any.Method-rvalue-reference.xml.txt index a8bfeec..50bf8cc 100644 --- a/test/expect/gccxml.any.Method-rvalue-reference.xml.txt +++ b/test/expect/gccxml.any.Method-rvalue-reference.xml.txt @@ -4,10 +4,10 @@ - + - + diff --git a/test/expect/gccxml.any.Method.xml.txt b/test/expect/gccxml.any.Method.xml.txt index ca938e8..49a7861 100644 --- a/test/expect/gccxml.any.Method.xml.txt +++ b/test/expect/gccxml.any.Method.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Namespace-Class-members.xml.txt b/test/expect/gccxml.any.Namespace-Class-members.xml.txt index bda8d84..0d3d0f0 100644 --- a/test/expect/gccxml.any.Namespace-Class-members.xml.txt +++ b/test/expect/gccxml.any.Namespace-Class-members.xml.txt @@ -2,12 +2,12 @@ ]*> - + - + diff --git a/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt b/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt index 16ce547..640c221 100644 --- a/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt +++ b/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt @@ -2,7 +2,7 @@ ]*> - + diff --git a/test/expect/gccxml.any.Namespace-repeat-start.xml.txt b/test/expect/gccxml.any.Namespace-repeat-start.xml.txt index a493bd3..dc21ff9 100644 --- a/test/expect/gccxml.any.Namespace-repeat-start.xml.txt +++ b/test/expect/gccxml.any.Namespace-repeat-start.xml.txt @@ -1,8 +1,8 @@ ^<\?xml version="1.0"\?> ]*> - - + + diff --git a/test/expect/gccxml.any.Namespace-repeat.xml.txt b/test/expect/gccxml.any.Namespace-repeat.xml.txt index 6abb7cb..b8b3733 100644 --- a/test/expect/gccxml.any.Namespace-repeat.xml.txt +++ b/test/expect/gccxml.any.Namespace-repeat.xml.txt @@ -2,8 +2,8 @@ ]*> - - + + diff --git a/test/expect/gccxml.any.OperatorFunction.xml.txt b/test/expect/gccxml.any.OperatorFunction.xml.txt index f7037ce..831e1bf 100644 --- a/test/expect/gccxml.any.OperatorFunction.xml.txt +++ b/test/expect/gccxml.any.OperatorFunction.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.OperatorMethod.xml.txt b/test/expect/gccxml.any.OperatorMethod.xml.txt index b72b2cd..9e2fed5 100644 --- a/test/expect/gccxml.any.OperatorMethod.xml.txt +++ b/test/expect/gccxml.any.OperatorMethod.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Variable-in-Class.xml.txt b/test/expect/gccxml.any.Variable-in-Class.xml.txt index 12e8056..e693ab1 100644 --- a/test/expect/gccxml.any.Variable-in-Class.xml.txt +++ b/test/expect/gccxml.any.Variable-in-Class.xml.txt @@ -1,12 +1,12 @@ ^<\?xml version="1.0"\?> ]*> - + - + diff --git a/test/expect/gccxml.any.Variable-init.xml.txt b/test/expect/gccxml.any.Variable-init.xml.txt index 6061dc1..96ed031 100644 --- a/test/expect/gccxml.any.Variable-init.xml.txt +++ b/test/expect/gccxml.any.Variable-init.xml.txt @@ -1,8 +1,8 @@ ^<\?xml version="1.0"\?> ]*> - - + + diff --git a/test/expect/gccxml.any.Variable.xml.txt b/test/expect/gccxml.any.Variable.xml.txt index 8438c3c..3dde32c 100644 --- a/test/expect/gccxml.any.Variable.xml.txt +++ b/test/expect/gccxml.any.Variable.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.implicit-decl-ms.xml.txt b/test/expect/gccxml.any.implicit-decl-ms.xml.txt index f4ba07a..63d2e25 100644 --- a/test/expect/gccxml.any.implicit-decl-ms.xml.txt +++ b/test/expect/gccxml.any.implicit-decl-ms.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.inline-asm-ms.xml.txt b/test/expect/gccxml.any.inline-asm-ms.xml.txt index 950ac5f..9cca376 100644 --- a/test/expect/gccxml.any.inline-asm-ms.xml.txt +++ b/test/expect/gccxml.any.inline-asm-ms.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/expect/gccxml.any.using-declaration-class.xml.txt b/test/expect/gccxml.any.using-declaration-class.xml.txt index 1ade161..27e2a4f 100644 --- a/test/expect/gccxml.any.using-declaration-class.xml.txt +++ b/test/expect/gccxml.any.using-declaration-class.xml.txt @@ -3,17 +3,17 @@ - + - + - + @@ -27,7 +27,7 @@ - + diff --git a/test/expect/gccxml.broken.any.ReferenceType-to-Class-template.xml.txt b/test/expect/gccxml.broken.any.ReferenceType-to-Class-template.xml.txt index 8e2b830..e15cd3c 100644 --- a/test/expect/gccxml.broken.any.ReferenceType-to-Class-template.xml.txt +++ b/test/expect/gccxml.broken.any.ReferenceType-to-Class-template.xml.txt @@ -1,14 +1,14 @@ ^<\?xml version="1.0"\?> ]*> - + - + - + diff --git a/test/expect/gccxml.c++11.Class-bases.xml.txt b/test/expect/gccxml.c++11.Class-bases.xml.txt index 56d391f..c9535df 100644 --- a/test/expect/gccxml.c++11.Class-bases.xml.txt +++ b/test/expect/gccxml.c++11.Class-bases.xml.txt @@ -5,7 +5,7 @@ - + @@ -19,7 +19,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/test/expect/gccxml.c++11.Class-template-bases.xml.txt b/test/expect/gccxml.c++11.Class-template-bases.xml.txt index a335a95..33f0acc 100644 --- a/test/expect/gccxml.c++11.Class-template-bases.xml.txt +++ b/test/expect/gccxml.c++11.Class-template-bases.xml.txt @@ -8,7 +8,7 @@ - + @@ -21,7 +21,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/test/expect/gccxml.c++98.Class-bases.xml.txt b/test/expect/gccxml.c++98.Class-bases.xml.txt index 8d8ade5..6c6f11d 100644 --- a/test/expect/gccxml.c++98.Class-bases.xml.txt +++ b/test/expect/gccxml.c++98.Class-bases.xml.txt @@ -5,7 +5,7 @@ - + @@ -23,7 +23,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/test/expect/gccxml.c++98.Class-template-bases.xml.txt b/test/expect/gccxml.c++98.Class-template-bases.xml.txt index 3629ddb..a7c7af9 100644 --- a/test/expect/gccxml.c++98.Class-template-bases.xml.txt +++ b/test/expect/gccxml.c++98.Class-template-bases.xml.txt @@ -8,7 +8,7 @@ - + @@ -21,7 +21,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/test/expect/gccxml.c89.GNU-float128.xml.txt b/test/expect/gccxml.c89.GNU-float128.xml.txt index 7e15809..66dfde7 100644 --- a/test/expect/gccxml.c89.GNU-float128.xml.txt +++ b/test/expect/gccxml.c89.GNU-float128.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> ]*> - + diff --git a/test/run.cmake b/test/run.cmake index a123639..fda9f00 100644 --- a/test/run.cmake +++ b/test/run.cmake @@ -78,6 +78,7 @@ if(msg) set(update_xml "${actual_xml}") string(REGEX REPLACE "^<\\?xml version=\"1.0\"\\?>" "^<\\\\?xml version=\"1.0\"\\\\?>" update_xml "${update_xml}") string(REGEX REPLACE "]*>" "]*>" update_xml "${update_xml}") + string(REGEX REPLACE "mangled=\"[^\"]*\"" "mangled=\"[^\"]+\"" update_xml "${update_xml}") string(REGEX REPLACE "artificial=\"1\"( throws=\"\")?" "artificial=\"1\"( throws=\"\")?" update_xml "${update_xml}") string(REGEX REPLACE "size=\"[0-9]+\" align=\"[0-9]+\"" "size=\"[0-9]+\" align=\"[0-9]+\"" update_xml "${update_xml}") string(REGEX REPLACE "" "" update_xml "${update_xml}") -- cgit v0.12