Open Quuxplusone opened 11 years ago
Bugzilla Link | PR16909 |
Status | NEW |
Importance | P normal |
Reported by | Eli Friedman (efriedma@quicinc.com) |
Reported on | 2013-08-16 00:04:10 -0700 |
Last modified on | 2016-11-22 06:27:21 -0800 |
Version | unspecified |
Hardware | PC Windows NT |
CC | arphaman@gmail.com, blangmuir@apple.com, bob.wilson@apple.com, dgregor@apple.com, llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
This can also cause assertion failures or generate invalid IR:
template<typename T> struct A {
template<typename U> struct B {};
};
struct C {};
template<typename T> A<T>::B<T> begin(const T &);
void test() {
auto __begin = begin(5); // asserts because we didn't deduce the type of __begin
for (auto &&x : C()); // without assertions, will produce invalid LLVM IR
}
This is also tracked as rdar://problem/19438432.
Ben proposed a patch:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150126/122055.html