diff options
author | Brad King <brad.king@kitware.com> | 2014-04-11 18:08:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-11 18:08:28 (GMT) |
commit | 81475d7fc881a5cdaa2e2a1e61ad335a52549093 (patch) | |
tree | 50ce3ee1319694f7fe941a748c82aff2a25873d3 /test | |
parent | b82cb69be094485eea6e091c30d8de60443ba64b (diff) | |
download | CastXML-81475d7fc881a5cdaa2e2a1e61ad335a52549093.zip CastXML-81475d7fc881a5cdaa2e2a1e61ad335a52549093.tar.gz CastXML-81475d7fc881a5cdaa2e2a1e61ad335a52549093.tar.bz2 |
Output: Traverse extern "C" namespace members
Teach AddDeclContextMembers to recurse on LinkageSpecDecl members.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.any.Namespace-extern-C-members.xml.txt | 11 | ||||
-rw-r--r-- | test/input/Namespace-extern-C-members.cxx | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 40d05e8..27b2972 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -162,6 +162,7 @@ castxml_test_gccxml(Namespace-Class-partial-template-members) castxml_test_gccxml(Namespace-Class-template-members) castxml_test_gccxml(Namespace-Function-template-members) castxml_test_gccxml(Namespace-empty) +castxml_test_gccxml(Namespace-extern-C-members) castxml_test_gccxml(OffsetType) castxml_test_gccxml(OffsetType-cv) castxml_test_gccxml(OperatorFunction) diff --git a/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt b/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt new file mode 100644 index 0000000..33f04f3 --- /dev/null +++ b/test/expect/gccxml.any.Namespace-extern-C-members.xml.txt @@ -0,0 +1,11 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Namespace id="_1" name="start" context="_2" members="_3 _4"/> + <Typedef id="_3" name="Int" type="_5" context="_1" location="f1:3" file="f1" line="3"/> + <Function id="_4" name="function" returns="_3" context="_1" location="f1:4" file="f1" line="4"> + <Argument type="_3" location="f1:4" file="f1" line="4"/> + </Function> + <FundamentalType id="_5" name="int"/> + <Namespace id="_2" name="::"/> + <File id="f1" name=".*/test/input/Namespace-extern-C-members.cxx"/> +</GCC_XML>$ diff --git a/test/input/Namespace-extern-C-members.cxx b/test/input/Namespace-extern-C-members.cxx new file mode 100644 index 0000000..debf987 --- /dev/null +++ b/test/input/Namespace-extern-C-members.cxx @@ -0,0 +1,6 @@ +namespace start { + extern "C" { + typedef int Int; + Int function(Int); + } +} |