= Context.getCanonicalType(Context.getTypeDeclType(ClassDecl));
if (const ReferenceType *ConvTypeRef = ConvType->getAs<ReferenceType>())
ConvType = ConvTypeRef->getPointeeType();
- if (ConvType->isRecordType()) {
+ if (Conversion->getTemplateSpecializationKind() != TSK_Undeclared &&
+ Conversion->getTemplateSpecializationKind() != TSK_ExplicitSpecialization)
+ /* Suppress disanogstics for instantiations. */;
+ else if (ConvType->isRecordType()) {
ConvType = Context.getCanonicalType(ConvType).getUnqualifiedType();
if (ConvType == ClassType)
Diag(Conversion->getLocation(), diag::warn_conv_to_self_not_used)
int i = ed;
}
}
+
+namespace PR8065 {
+ template <typename T> struct Iterator;
+ template <typename T> struct Container;
+
+ template<>
+ struct Iterator<int> {
+ typedef Container<int> container_type;
+ };
+
+ template <typename T>
+ struct Container {
+ typedef typename Iterator<T>::container_type X;
+ operator X(void) { return X(); }
+ };
+
+ Container<int> test;
+}