Clang rejects this: template<typename T> struct X { auto f() { return 0; } void g() { f(); } }; saying: <stdin>:3:14: error: function 'f' with deduced return type cannot be used before it is defined void g() { f(); } ^ This isn't right: we should be allowed to reference this function as a member of the current instantiation. We should probably deduce the return type to DependentTy when the template is defined.
Fixed in r188410.
*** Bug 16884 has been marked as a duplicate of this bug. ***