summaryrefslogtreecommitdiffstats
path: root/test/expect/gccxml.any.Namespace-inline.xml.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-15 19:51:25 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-15 19:51:25 (GMT)
commitd741c9e4e56ff43dc35603327f1a8d30c8bb167c (patch)
tree6b9cc06532204d3ff7c8b5fa751cbef4e976ec83 /test/expect/gccxml.any.Namespace-inline.xml.txt
parent5587062f5f894d7b2d7a61679a495535db0a8924 (diff)
downloadCastXML-d741c9e4e56ff43dc35603327f1a8d30c8bb167c.zip
CastXML-d741c9e4e56ff43dc35603327f1a8d30c8bb167c.tar.gz
CastXML-d741c9e4e56ff43dc35603327f1a8d30c8bb167c.tar.bz2
Output: Place inline namespace members in containing namespace
An inline namespace affects the linkage of its members but for APIs the members are effectively in the containing namespace. Generate output as if they were really in the containing namespace and do not generate a Namespace element for an inline namespace. If --castxml-start names an inline namespace simply ignore it to avoid dumping a Namespace element for it. One can argue this is valid since the inline namespace should not normally be named in API usage. Set our printing policy to avoid showing the inline namespace component automatically. Note that expressions in the source code that hard-code the inline namespace name will still be preserved and show the inline namespace when printed (e.g. Variable init="" attribute expressions). Suggested-by: Michka Popoff <michkapopoff@gmail.com>
Diffstat (limited to 'test/expect/gccxml.any.Namespace-inline.xml.txt')
-rw-r--r--test/expect/gccxml.any.Namespace-inline.xml.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/expect/gccxml.any.Namespace-inline.xml.txt b/test/expect/gccxml.any.Namespace-inline.xml.txt
new file mode 100644
index 0000000..f54e7a7
--- /dev/null
+++ b/test/expect/gccxml.any.Namespace-inline.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Struct id="_3" name="A" context="_1" location="f1:4" file="f1" line="4" incomplete="1"/>
+ <Struct id="_4" name="B" context="_1" location="f1:6" file="f1" line="6" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-inline.cxx"/>
+</GCC_XML>$