diff options
author | Brad King <brad.king@kitware.com> | 2014-04-14 17:36:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-14 17:37:53 (GMT) |
commit | 68009c611d9fbf5ad8391e12e4d40c5716aee43e (patch) | |
tree | 3f8e1f58046e8d3fc948d393479d4c6ea89be1ea /test | |
parent | 2bba2e9e8900666ca92a7abb848ee8e5756462d8 (diff) | |
download | CastXML-68009c611d9fbf5ad8391e12e4d40c5716aee43e.zip CastXML-68009c611d9fbf5ad8391e12e4d40c5716aee43e.tar.gz CastXML-68009c611d9fbf5ad8391e12e4d40c5716aee43e.tar.bz2 |
Output: Add function calling convention attributes
Add to Function-like and FunctionType elements an attributes=""
attribute for the calling convention as gccxml does.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.any.Function-calling-convention-ms.xml.txt | 26 | ||||
-rw-r--r-- | test/input/Function-calling-convention-ms.cxx | 4 |
3 files changed, 31 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 22858aa..902f892 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -189,6 +189,7 @@ castxml_test_gccxml(using-directive-start) if(";${LLVM_TARGETS_TO_BUILD};" MATCHES ";X86;") set(castxml_test_gccxml_extra_arguments -target i386-pc-windows-msvc) + castxml_test_gccxml(Function-calling-convention-ms) castxml_test_gccxml(implicit-decl-ms) castxml_test_gccxml(inline-asm-ms) unset(castxml_test_gccxml_extra_arguments) diff --git a/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt b/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt new file mode 100644 index 0000000..012f4df --- /dev/null +++ b/test/expect/gccxml.any.Function-calling-convention-ms.xml.txt @@ -0,0 +1,26 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Function id="_1" name="start" returns="_5" context="_6" location="f1:1" file="f1" line="1"> + <Argument type="_7" location="f1:1" file="f1" line="1"/> + </Function> + <Function id="_2" name="start" returns="_5" context="_6" location="f1:2" file="f1" line="2" attributes="__stdcall__"> + <Argument type="_8" location="f1:2" file="f1" line="2"/> + </Function> + <Function id="_3" name="start" returns="_5" context="_6" location="f1:3" file="f1" line="3" attributes="__fastcall__"> + <Argument type="_9" location="f1:3" file="f1" line="3"/> + </Function> + <Function id="_4" name="start" returns="_5" context="_6" location="f1:4" file="f1" line="4" attributes="__thiscall__"> + <Argument type="_10" location="f1:4" file="f1" line="4"/> + </Function> + <FundamentalType id="_5" name="void"/> + <PointerType id="_7" type="_11"/> + <PointerType id="_8" type="_12"/> + <PointerType id="_9" type="_13"/> + <PointerType id="_10" type="_14"/> + <Namespace id="_6" name="::"/> + <FunctionType id="_11" returns="_5"/> + <FunctionType id="_12" returns="_5" attributes="__stdcall__"/> + <FunctionType id="_13" returns="_5" attributes="__fastcall__"/> + <FunctionType id="_14" returns="_5" attributes="__thiscall__"/> + <File id="f1" name=".*/test/input/Function-calling-convention-ms.cxx"/> +</GCC_XML>$ diff --git a/test/input/Function-calling-convention-ms.cxx b/test/input/Function-calling-convention-ms.cxx new file mode 100644 index 0000000..fac3c42 --- /dev/null +++ b/test/input/Function-calling-convention-ms.cxx @@ -0,0 +1,4 @@ +void __cdecl start(void (__cdecl *)()); +void __stdcall start(void (__stdcall *)()); +void __fastcall start(void (__fastcall *)()); +void __thiscall start(void (__thiscall *)()); |