summaryrefslogtreecommitdiffstats
path: root/test/input
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-11 19:44:46 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-11 19:50:52 (GMT)
commit9cd30fb0f554fd22ea98a59dd1abadd35804f754 (patch)
treefc637ef260e93e7c8543c9c5624fb27970d3d388 /test/input
parent6feeb4e7dfb7cf79fadc06f9184924810668110a (diff)
downloadCastXML-9cd30fb0f554fd22ea98a59dd1abadd35804f754.zip
CastXML-9cd30fb0f554fd22ea98a59dd1abadd35804f754.tar.gz
CastXML-9cd30fb0f554fd22ea98a59dd1abadd35804f754.tar.bz2
Output: Fix references to cv-qualified types encountered indirectly
Teach AddDumpNode to optionally report back the actual QualType that it selects after possibly unwrapping some layers of indirection in the Clang AST. Use this in GetTypeIdRef so that we check this actual QualType's cv qualifiers instead of the original QualType. Otherwise we may generate a dangling reference to the id number that is replaced by a CvQualifiedType id. Fix the expected output of existing test cases that exhibit this problem and add a new test case designed to cover the behavior explicitly.
Diffstat (limited to 'test/input')
-rw-r--r--test/input/Class-template-member-Typedef-const.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/input/Class-template-member-Typedef-const.cxx b/test/input/Class-template-member-Typedef-const.cxx
new file mode 100644
index 0000000..f2a21b7
--- /dev/null
+++ b/test/input/Class-template-member-Typedef-const.cxx
@@ -0,0 +1,6 @@
+template <typename T> class start {
+ typedef T IntConst;
+public:
+ T method(IntConst);
+};
+template class start<int const>;