diff options
author | Brad King <brad.king@kitware.com> | 2014-02-26 21:42:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-21 21:06:39 (GMT) |
commit | 4dc642dd1ab2f4bcf3f212ae7a4f6ede636ab3b2 (patch) | |
tree | e2bf7c13b8840d91a12c60718610db5c9155105d /test | |
parent | 317e88fd4d6f77cb6e21666690c8fcdbad23a153 (diff) | |
download | CastXML-4dc642dd1ab2f4bcf3f212ae7a4f6ede636ab3b2.zip CastXML-4dc642dd1ab2f4bcf3f212ae7a4f6ede636ab3b2.tar.gz CastXML-4dc642dd1ab2f4bcf3f212ae7a4f6ede636ab3b2.tar.bz2 |
Output: Generate FunctionType elements
Implement the OutputFunctionProtoType method to generate the
FunctionType element. Report the return type. Inside the FunctionType
element generate Argument elements describing the function type
parameter types. For each argument report the type and queue it.
Create a OutputFunctionTypeHelper method to hold the main implementation
and call it from OutputFunctionProtoType with the "FunctionType" name as
an argument. This will allow it to be re-used for other function types
later.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.FunctionType-xml.txt | 11 | ||||
-rw-r--r-- | test/input/FunctionType.cxx | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a8762ab..e6a69f1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -75,6 +75,7 @@ castxml_test_gccxml(Field) castxml_test_gccxml(Function) castxml_test_gccxml(Function-template) castxml_test_gccxml(Function-throw) +castxml_test_gccxml(FunctionType) castxml_test_gccxml(FundamentalType) castxml_test_gccxml(Method) castxml_test_gccxml(Namespace) diff --git a/test/expect/gccxml.FunctionType-xml.txt b/test/expect/gccxml.FunctionType-xml.txt new file mode 100644 index 0000000..9e05ce6 --- /dev/null +++ b/test/expect/gccxml.FunctionType-xml.txt @@ -0,0 +1,11 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/> + <FunctionType id="_2" returns="_4"> + <Argument type="_5"/> + </FunctionType> + <FundamentalType id="_4" name="void"/> + <FundamentalType id="_5" name="int"/> + <Namespace id="_3" name="::"/> + <File id="f1" name=".*/test/input/FunctionType.cxx"/> +</GCC_XML>$ diff --git a/test/input/FunctionType.cxx b/test/input/FunctionType.cxx new file mode 100644 index 0000000..9b238a3 --- /dev/null +++ b/test/input/FunctionType.cxx @@ -0,0 +1 @@ +typedef void start(int); |