summaryrefslogtreecommitdiffstats
path: root/test/input/Class-template-constructor-template.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-27 17:04:44 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-27 18:14:19 (GMT)
commitfc66c82e1de6afd4453b7223c51de50428a40769 (patch)
treeb75a56e010a74b00ed3d7d9979688faf3652cb14 /test/input/Class-template-constructor-template.cxx
parentf2d0fdfe812c7f96d8193194a5840ff011aa7ec8 (diff)
downloadCastXML-fc66c82e1de6afd4453b7223c51de50428a40769.zip
CastXML-fc66c82e1de6afd4453b7223c51de50428a40769.tar.gz
CastXML-fc66c82e1de6afd4453b7223c51de50428a40769.tar.bz2
test: Show duplication of reference-to-class-template-specialization types
Clang generates a distinct TemplateSpecializationType for each appearance of A<T> for some template A<>. They are all sugar for an underlying RecordType. While they all share the same canonical type, LValueReferenceType instances that refer to them are also distinct and do not share the same canonical type because each has a different pointee type. Add tests demonstrating cases where this causes duplicate ReferenceType elements to be generated. Mark them as "broken" and add a note in the expected output that matches nothing but documents the problem.
Diffstat (limited to 'test/input/Class-template-constructor-template.cxx')
-rw-r--r--test/input/Class-template-constructor-template.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/input/Class-template-constructor-template.cxx b/test/input/Class-template-constructor-template.cxx
new file mode 100644
index 0000000..1ca5d93
--- /dev/null
+++ b/test/input/Class-template-constructor-template.cxx
@@ -0,0 +1,6 @@
+template <typename T> class start {
+public:
+ start(start const&);
+ template <typename U> start(start<U> const&);
+};
+start<int> instantiate_and_copy(start<int> const& x) { return x; }