diff options
author | Brad King <brad.king@kitware.com> | 2014-03-31 15:12:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-31 15:17:14 (GMT) |
commit | acac132995f585d5ac0d9d2711bbf44e86b66597 (patch) | |
tree | e48930f08cb5d878fc76db844d4070ae04b1b90f /test | |
parent | 7b6294eef526429d1124acbdc258e09c8be217a3 (diff) | |
download | CastXML-acac132995f585d5ac0d9d2711bbf44e86b66597.zip CastXML-acac132995f585d5ac0d9d2711bbf44e86b66597.tar.gz CastXML-acac132995f585d5ac0d9d2711bbf44e86b66597.tar.bz2 |
Output: Skip through extern "C" contexts to enclosing namespace
The gccxml output format has no representation for extern "C"
declaration contexts, so simply report the enclosing namespace.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.Typedef-to-extern-C-FundamentalType-mode-xml.txt | 7 | ||||
-rw-r--r-- | test/input/Typedef-to-extern-C-FundamentalType-mode.cxx | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 158215a..ac60cd6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -139,6 +139,7 @@ castxml_test_gccxml(Typedef-to-Class-template) castxml_test_gccxml(Typedef-to-Enumeration) castxml_test_gccxml(Typedef-to-Enumeration-anonymous) castxml_test_gccxml(Typedef-to-FundamentalType-mode) +castxml_test_gccxml(Typedef-to-extern-C-FundamentalType-mode) castxml_test_gccxml(Variable) castxml_test_gccxml(Variable-in-Class) castxml_test_gccxml(Variable-init) diff --git a/test/expect/gccxml.Typedef-to-extern-C-FundamentalType-mode-xml.txt b/test/expect/gccxml.Typedef-to-extern-C-FundamentalType-mode-xml.txt new file mode 100644 index 0000000..5882ed8 --- /dev/null +++ b/test/expect/gccxml.Typedef-to-extern-C-FundamentalType-mode-xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Typedef id="_1" name="start" type="_2" context="_3" location="f1:2" file="f1" line="2"/> + <FundamentalType id="_2" name="short int"/> + <Namespace id="_3" name="::"/> + <File id="f1" name=".*/test/input/Typedef-to-extern-C-FundamentalType-mode.cxx"/> +</GCC_XML>$ diff --git a/test/input/Typedef-to-extern-C-FundamentalType-mode.cxx b/test/input/Typedef-to-extern-C-FundamentalType-mode.cxx new file mode 100644 index 0000000..3e966f0 --- /dev/null +++ b/test/input/Typedef-to-extern-C-FundamentalType-mode.cxx @@ -0,0 +1,3 @@ +extern "C" { + typedef int start __attribute__ ((__mode__ (__HI__))); +} |