blob: 0d2fc06dc35ac827ab677a34e43a8e3b4c3ee00e [file] [log] [blame]
// RUN: %clang_cc1 -fsyntax-only -verify %s
@class NSString;
// Reduced from WebKit.
namespace test0 {
template <typename T> struct RemovePointer {
typedef T Type;
};
template <typename T> struct RemovePointer<T*> {
typedef T Type;
};
template <typename T> struct RetainPtr {
typedef typename RemovePointer<T>::Type ValueType;
typedef ValueType* PtrType;
RetainPtr(PtrType ptr);
};
void test(NSString *S) {
RetainPtr<NSString*> ptr(S);
}
void test(id S) {
RetainPtr<id> ptr(S);
}
}