diff options
author | Brad King <brad.king@kitware.com> | 2014-03-31 14:58:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-31 14:58:45 (GMT) |
commit | 7b6294eef526429d1124acbdc258e09c8be217a3 (patch) | |
tree | 4a34e954fb21d5353dac261ee3fd21ff809a12f2 /test | |
parent | e2e8a196b04868ebaa739af1f1bffbd907e78ada (diff) | |
download | CastXML-7b6294eef526429d1124acbdc258e09c8be217a3.zip CastXML-7b6294eef526429d1124acbdc258e09c8be217a3.tar.gz CastXML-7b6294eef526429d1124acbdc258e09c8be217a3.tar.bz2 |
Output: Skip friend function templates
The gccxml output format does not support uninstantiated templates
so we need to skip friend declarations referencing them.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.Class-template-friends-xml.txt | 22 | ||||
-rw-r--r-- | test/input/Class-template-friends.cxx | 8 |
3 files changed, 31 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fd35886..158215a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -104,6 +104,7 @@ castxml_test_gccxml(Class-member-template) castxml_test_gccxml(Class-template) castxml_test_gccxml(Class-template-Method-Argument-default) castxml_test_gccxml(Class-template-bases) +castxml_test_gccxml(Class-template-friends) castxml_test_gccxml(Class-template-member-Typedef) castxml_test_gccxml(Class-template-member-template) castxml_test_gccxml(CvQualifiedType) diff --git a/test/expect/gccxml.Class-template-friends-xml.txt b/test/expect/gccxml.Class-template-friends-xml.txt new file mode 100644 index 0000000..8bcd543 --- /dev/null +++ b/test/expect/gccxml.Class-template-friends-xml.txt @@ -0,0 +1,22 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Class id="_1" name="start<int>" context="_2" location="f1:8" file="f1" line="8" members="_3 _4 _5 _6" befriending="_7 _8"/> + <Constructor id="_3" name="start" context="_1" access="public" location="f1:8" file="f1" line="8" inline="1" artificial="1"/> + <Constructor id="_4" name="start" context="_1" access="public" location="f1:8" file="f1" line="8" inline="1" artificial="1"> + <Argument type="_9" location="f1:8" file="f1" line="8"/> + </Constructor> + <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:8" file="f1" line="8" inline="1" artificial="1"> + <Argument type="_9" location="f1:8" file="f1" line="8"/> + </OperatorMethod> + <Destructor id="_6" name="start" context="_1" access="public" location="f1:8" file="f1" line="8" inline="1" artificial="1"/> + <ReferenceType id="_9" type="_1c"/> + <ReferenceType id="_10" type="_1"/> + <Namespace id="_2" name="::"/> + <Class id="_8" name="A<int>" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/> + <Function id="_7" name="f" returns="_12" context="_2" location="f1:5" file="f1" line="5"> + <Argument type="_12" location="f1:2" file="f1" line="2"/> + </Function> + <CvQualifiedType id="_1c" type="_1" const="1"/> + <FundamentalType id="_12" name="int"/> + <File id="f1" name=".*/test/input/Class-template-friends.cxx"/> +</GCC_XML>$ diff --git a/test/input/Class-template-friends.cxx b/test/input/Class-template-friends.cxx new file mode 100644 index 0000000..e1b3166 --- /dev/null +++ b/test/input/Class-template-friends.cxx @@ -0,0 +1,8 @@ +template <typename T> class A; +template <typename T> int f(T); +template <typename T> class start { + friend class A<T>; + friend int f<T>(T); + template <typename U> friend int f(U); +}; +template class start<int>; |