[cfe-commits] r107479 - /cfe/trunk/test/PCH/cxx-templates.h
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jul 2 04:55:48 PDT 2010
Author: akirtzidis
Date: Fri Jul 2 06:55:48 2010
New Revision: 107479
URL: http://llvm.org/viewvc/llvm-project?rev=107479&view=rev
Log:
Provide some test cases for C++ PCH.
Modified:
cfe/trunk/test/PCH/cxx-templates.h
Modified: cfe/trunk/test/PCH/cxx-templates.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-templates.h?rev=107479&r1=107478&r2=107479&view=diff
==============================================================================
--- cfe/trunk/test/PCH/cxx-templates.h (original)
+++ cfe/trunk/test/PCH/cxx-templates.h Fri Jul 2 06:55:48 2010
@@ -1,7 +1,11 @@
// Header for PCH test cxx-templates.cpp
template <typename T1, typename T2>
+struct S;
+
+template <typename T1, typename T2>
struct S {
+ S() { }
static void templ();
};
@@ -65,3 +69,34 @@
using UseBase<T>::foo;
using typename UseBase<T>::bar;
};
+
+template <class T> class Sub : public UseBase<int> { };
+
+template <class _Ret, class _Tp>
+ class mem_fun_t
+ {
+ public:
+ explicit
+ mem_fun_t(_Ret (_Tp::*__pf)())
+ {}
+
+ private:
+ _Ret (_Tp::*_M_f)();
+ };
+
+template<unsigned N>
+bool isInt(int x);
+
+template<> bool isInt<8>(int x) {
+ return true;
+}
+
+template<typename _CharT>
+int __copy_streambufs_eof(_CharT);
+
+class basic_streambuf
+{
+ void m() { }
+ friend int __copy_streambufs_eof<>(int);
+};
+
More information about the cfe-commits
mailing list