Add boundary check for ASTUnresolvedSet::erase
When compile following code with clang (Debug build), Assertion will be triggered. ``` struct A { struct Nested {}; operator Nested*() {return 0;}; }; struct B : A { using A::operator typename A::Nested*; operator typename A::Nested *() { struct A * thi = this; return *thi; }; }; ``` The assertion fail is caused by: `void erase(unsigned I) { Decls[I] = Decls.pop_back_val(); }` when size of `Decls` is 1 before erase. Reviewed By: rjmccall, MaskRay Differential Revision: https://reviews.llvm.org/D137263
Loading
Please sign in to comment