diff options
author | Brad King <brad.king@kitware.com> | 2014-03-27 17:04:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-27 18:14:19 (GMT) |
commit | fc66c82e1de6afd4453b7223c51de50428a40769 (patch) | |
tree | b75a56e010a74b00ed3d7d9979688faf3652cb14 /test/input/Class-template-constructor-template.cxx | |
parent | f2d0fdfe812c7f96d8193194a5840ff011aa7ec8 (diff) | |
download | CastXML-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.cxx | 6 |
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; } |