summaryrefslogtreecommitdiffstats
path: root/test/input
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-04-12 14:34:35 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-12 17:26:10 (GMT)
commitb367e2db71910f088856849fd2990207cf5841c4 (patch)
tree0b172f39eb4ff94fe6c789a94e17518d52ffe645 /test/input
parentcea9ba63e1efedb4052a50b4f5dda13b664ffff6 (diff)
downloadCastXML-b367e2db71910f088856849fd2990207cf5841c4.zip
CastXML-b367e2db71910f088856849fd2990207cf5841c4.tar.gz
CastXML-b367e2db71910f088856849fd2990207cf5841c4.tar.bz2
Output: Fix access specifier of class template instantiations
In code like class foo { template <typename> class bar {}; }; the instantiations of `foo::bar<>` should have the same access as the original template. Clang generates access `AS_none` for member template instantiations because they have no meaningful access of their own. Previously we have misinterpreted this as `AS_public` because it is not `AS_private` or `AS_protected`. Instead we must detect when a class is a template instantiation and get the access specifier from its original template. GitHub-Issue: CastXML/CastXML#56
Diffstat (limited to 'test/input')
-rw-r--r--test/input/Class-member-template-access.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/input/Class-member-template-access.cxx b/test/input/Class-member-template-access.cxx
new file mode 100644
index 0000000..d05fe4b
--- /dev/null
+++ b/test/input/Class-member-template-access.cxx
@@ -0,0 +1,4 @@
+class start {
+ template <typename> class member {};
+};
+template class start::member<int>; // instantiation