[cfe-dev] Can we diagnose this?

Sean Silva silvas at purdue.edu
Sat Feb 23 20:54:59 PST 2013

Slide 11 of <http://miek.nl/downloads/2010/c++-talk.pdf> shows the
following code as sending the compiler into an infloop:

template<class T> struct Loop { Loop<T*> operator->(); };
Loop<int> i, j = i->hooray;

I just verified that clang does go into an infloop for this and
clang's resident memory starts growing without bound. Is there some
way for us to detect this and properly diagnose?

Also, I'll file a PR to track this unless somebody knows if we already
have a PR for it or we deliberately don't do anything about this

-- Sean Silva

More information about the cfe-dev mailing list