code = type->code ();
if (local_name != NULL)
{
+ c_type_print_modifier (type, stream, 0, 1, language);
fputs_filtered (local_name, stream);
if (varstring != NULL && *varstring != '\0')
fputs_filtered (" ", stream);
char string[3];
+// Template class with typedefs and const attributes.
+template<typename DataT>
+class Cfoo
+{
+ typedef float myfloat;
+public:
+ DataT me0;
+ const DataT me1=1;
+ const myfloat me2=2.0;
+ const int me3=0;
+};
+
// Template for nested instantiations
sic.spec ('c');
siip.spec (&x);
+ Cfoo<double> cfoo;
+
Garply<int> f;
Garply<char> fc;
f.x = 13;
}
}
+# Check cv qualifiers and substitute parameters.
+
+if {[test_compiler_info {clang-*}]} {
+ setup_kfail "llvm/52262 " "*-*-*"
+}
+gdb_test "ptype cfoo" [multi_line \
+"type = (class |)Cfoo<double> \\\[with DataT = double\\\] \\{" \
+ "\[ \t\]*public:" \
+ "\[ \t\]*DataT me0;" \
+ "\[ \t\]*const DataT me1;" \
+ "\[ \t\]*const myfloat me2;" \
+ "\[ \t\]*const int me3;" \
+ "" \
+ "\[ \t\]*private:" \
+ "\[ \t\]*typedef float myfloat;" \
+"\\}" \
+] "print type of cfoo"
+
+# Check cv qualifiers and do not substitute.
+
+if {[test_compiler_info {clang-*}]} {
+ setup_kfail "llvm/52262 " "*-*-*"
+}
+gdb_test "ptype/r cfoo" [multi_line \
+"type = (class |)Cfoo<double> \\{" \
+ "\[ \t\]*public:" \
+ "\[ \t\]*double me0;" \
+ "\[ \t\]*const double me1;" \
+ "\[ \t\]*const Cfoo<double>::myfloat me2;" \
+ "\[ \t\]*const int me3;" \
+ "" \
+ "\[ \t\]*private:" \
+ "\[ \t\]*typedef float myfloat;" \
+"\\}" \
+] "print raw type of cfoo"
+
# pt Garply<int>
gdb_test_multiple "ptype/r Garply<int>" "ptype Garply<int>" {