diff options
author | Brad King <brad.king@kitware.com> | 2017-01-13 13:15:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-13 13:15:37 (GMT) |
commit | e7252f578951cfebb57e7ab122b388404f278bc3 (patch) | |
tree | 85afacb1b79eefa7d107207a3e730e2c27341192 | |
parent | efaca06fe4b6e4e158cbb7482328efb1616ef604 (diff) | |
download | CastXML-e7252f578951cfebb57e7ab122b388404f278bc3.zip CastXML-e7252f578951cfebb57e7ab122b388404f278bc3.tar.gz CastXML-e7252f578951cfebb57e7ab122b388404f278bc3.tar.bz2 |
Output: Add size and align attributes to Enumeration
The GCC-XML output included these attributes, so CastXML should too.
Closes: #80
13 files changed, 13 insertions, 12 deletions
diff --git a/src/Output.cxx b/src/Output.cxx index 0ec2e0d..6152b36 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -1823,6 +1823,7 @@ void ASTVisitor::OutputEnumDecl(clang::EnumDecl const* d, DumpNode const* dn) this->PrintNameAttribute(name); this->PrintContextAttribute(d); this->PrintLocationAttribute(d); + this->PrintABIAttributes(d); this->PrintAttributesAttribute(d); clang::EnumDecl::enumerator_iterator enum_begin = d->enumerator_begin(); clang::EnumDecl::enumerator_iterator enum_end = d->enumerator_end(); diff --git a/test/expect/castxml1.any.Enumeration-annotate.xml.txt b/test/expect/castxml1.any.Enumeration-annotate.xml.txt index 0040743..bc74e26 100644 --- a/test/expect/castxml1.any.Enumeration-annotate.xml.txt +++ b/test/expect/castxml1.any.Enumeration-annotate.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> <CastXML[^>]*> - <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" attributes="annotate\(an annotation\)"> + <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+" attributes="annotate\(an annotation\)"> <EnumValue name="ev0" init="0" attributes="annotate\(an annotation\)"/> </Enumeration> <Namespace id="_2" name="::"/> diff --git a/test/expect/castxml1.any.Enumeration-anonymous.xml.txt b/test/expect/castxml1.any.Enumeration-anonymous.xml.txt index f0de02d..0b56c23 100644 --- a/test/expect/castxml1.any.Enumeration-anonymous.xml.txt +++ b/test/expect/castxml1.any.Enumeration-anonymous.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <CastXML[^>]*> <Namespace id="_1" name="start" context="_2" members="_3"/> - <Enumeration id="_3" name="" context="_1" location="f1:2" file="f1" line="2"> + <Enumeration id="_3" name="" context="_1" location="f1:2" file="f1" line="2" size="[0-9]+" align="[0-9]+"> <EnumValue name="ev0" init="0"/> <EnumValue name="ev1" init="1"/> </Enumeration> diff --git a/test/expect/castxml1.any.Enumeration.xml.txt b/test/expect/castxml1.any.Enumeration.xml.txt index 664a6c8..7c1c41e 100644 --- a/test/expect/castxml1.any.Enumeration.xml.txt +++ b/test/expect/castxml1.any.Enumeration.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> <CastXML[^>]*> - <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1"> + <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"> <EnumValue name="ev0" init="0"/> <EnumValue name="ev2" init="2"/> </Enumeration> diff --git a/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt b/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt index b2625fd..5844b34 100644 --- a/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt +++ b/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt @@ -2,7 +2,7 @@ <CastXML[^>]*> <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/> <Variable id="_3" name="C" type="_6c" init="0" context="_1" location="f1:2" file="f1" line="2" static="1" mangled="[^"]+"/> - <Enumeration id="_4" name="" context="_1" location="f1:3" file="f1" line="3"> + <Enumeration id="_4" name="" context="_1" location="f1:3" file="f1" line="3" size="[0-9]+" align="[0-9]+"> <EnumValue name="E" init="0"/> </Enumeration> <Function id="_5" name="f" returns="_7" context="_1" location="f1:7" file="f1" line="7" mangled="[^"]+"> diff --git a/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt b/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt index f403de1..19c6b7e 100644 --- a/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt +++ b/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <CastXML[^>]*> <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/> - <Enumeration id="_2" name="start" context="_3" location="f1:1" file="f1" line="1"/> + <Enumeration id="_2" name="start" context="_3" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"/> <Namespace id="_3" name="::"/> <File id="f1" name=".*/test/input/Typedef-to-Enumeration-anonymous.cxx"/> </CastXML>$ diff --git a/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt b/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt index d5e89f3..dd6e590 100644 --- a/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt +++ b/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <CastXML[^>]*> <Typedef id="_1" name="start" type="_2" context="_3" location="f1:4" file="f1" line="4"/> - <Enumeration id="_2" name="E" context="_3" location="f1:1" file="f1" line="1"/> + <Enumeration id="_2" name="E" context="_3" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"/> <Namespace id="_3" name="::"/> <File id="f1" name=".*/test/input/Typedef-to-Enumeration.cxx"/> </CastXML>$ diff --git a/test/expect/gccxml.any.Enumeration-annotate.xml.txt b/test/expect/gccxml.any.Enumeration-annotate.xml.txt index b9cc0da..3ea788b 100644 --- a/test/expect/gccxml.any.Enumeration-annotate.xml.txt +++ b/test/expect/gccxml.any.Enumeration-annotate.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> <GCC_XML[^>]*> - <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" attributes="annotate\(an annotation\)"> + <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+" attributes="annotate\(an annotation\)"> <EnumValue name="ev0" init="0" attributes="annotate\(an annotation\)"/> </Enumeration> <Namespace id="_2" name="::"/> diff --git a/test/expect/gccxml.any.Enumeration-anonymous.xml.txt b/test/expect/gccxml.any.Enumeration-anonymous.xml.txt index 385975b..2cab799 100644 --- a/test/expect/gccxml.any.Enumeration-anonymous.xml.txt +++ b/test/expect/gccxml.any.Enumeration-anonymous.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <GCC_XML[^>]*> <Namespace id="_1" name="start" context="_2" members="_3"/> - <Enumeration id="_3" name="" context="_1" location="f1:2" file="f1" line="2"> + <Enumeration id="_3" name="" context="_1" location="f1:2" file="f1" line="2" size="[0-9]+" align="[0-9]+"> <EnumValue name="ev0" init="0"/> <EnumValue name="ev1" init="1"/> </Enumeration> diff --git a/test/expect/gccxml.any.Enumeration.xml.txt b/test/expect/gccxml.any.Enumeration.xml.txt index b620c86..7e53443 100644 --- a/test/expect/gccxml.any.Enumeration.xml.txt +++ b/test/expect/gccxml.any.Enumeration.xml.txt @@ -1,6 +1,6 @@ ^<\?xml version="1.0"\?> <GCC_XML[^>]*> - <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1"> + <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"> <EnumValue name="ev0" init="0"/> <EnumValue name="ev2" init="2"/> </Enumeration> diff --git a/test/expect/gccxml.any.Function-Argument-default-ns.xml.txt b/test/expect/gccxml.any.Function-Argument-default-ns.xml.txt index 7dc1cad..fb62638 100644 --- a/test/expect/gccxml.any.Function-Argument-default-ns.xml.txt +++ b/test/expect/gccxml.any.Function-Argument-default-ns.xml.txt @@ -2,7 +2,7 @@ <GCC_XML[^>]*> <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/> <Variable id="_3" name="C" type="_6c" init="0" context="_1" location="f1:2" file="f1" line="2" static="1" mangled="[^"]+"/> - <Enumeration id="_4" name="" context="_1" location="f1:3" file="f1" line="3"> + <Enumeration id="_4" name="" context="_1" location="f1:3" file="f1" line="3" size="[0-9]+" align="[0-9]+"> <EnumValue name="E" init="0"/> </Enumeration> <Function id="_5" name="f" returns="_7" context="_1" location="f1:7" file="f1" line="7" mangled="[^"]+"> diff --git a/test/expect/gccxml.any.Typedef-to-Enumeration-anonymous.xml.txt b/test/expect/gccxml.any.Typedef-to-Enumeration-anonymous.xml.txt index d3a5950..2a382b2 100644 --- a/test/expect/gccxml.any.Typedef-to-Enumeration-anonymous.xml.txt +++ b/test/expect/gccxml.any.Typedef-to-Enumeration-anonymous.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <GCC_XML[^>]*> <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/> - <Enumeration id="_2" name="start" context="_3" location="f1:1" file="f1" line="1"/> + <Enumeration id="_2" name="start" context="_3" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"/> <Namespace id="_3" name="::"/> <File id="f1" name=".*/test/input/Typedef-to-Enumeration-anonymous.cxx"/> </GCC_XML>$ diff --git a/test/expect/gccxml.any.Typedef-to-Enumeration.xml.txt b/test/expect/gccxml.any.Typedef-to-Enumeration.xml.txt index 0e452dc..fe54ad5 100644 --- a/test/expect/gccxml.any.Typedef-to-Enumeration.xml.txt +++ b/test/expect/gccxml.any.Typedef-to-Enumeration.xml.txt @@ -1,7 +1,7 @@ ^<\?xml version="1.0"\?> <GCC_XML[^>]*> <Typedef id="_1" name="start" type="_2" context="_3" location="f1:4" file="f1" line="4"/> - <Enumeration id="_2" name="E" context="_3" location="f1:1" file="f1" line="1"/> + <Enumeration id="_2" name="E" context="_3" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"/> <Namespace id="_3" name="::"/> <File id="f1" name=".*/test/input/Typedef-to-Enumeration.cxx"/> </GCC_XML>$ |