[cfe-dev] Running clang over the C++ standard header <vector>
Eli Friedman
eli.friedman at gmail.com
Wed Jun 10 03:16:59 PDT 2009
I was curious how much trouble clang would have with <vector>
considering current template work, so I tried it out; ignoring using
declarations, I've managed to reduce the following issues, which I
think are distinct from each other.
Crash 1:
template<class T> struct a { typedef int v; };
template<class T, bool = a<T>::v> struct p { typedef double v; };
Crash 2:
template<class T> struct a {};
template<class T> T a<T>::x;
Crash 3:
template<typename T> T a() { return typename T::x(); }
Crash 4:
template<class T> class Q;
template<class T> class R : Q<Q<T> > {T current;};
Parser error on valid code:
struct a { template<class T> a(T) { T a; } };
I'm not sure whether it's appropriate to file bugs for all of these at
the moment...
-Eli
More information about the cfe-dev
mailing list