xref: /llvm-project/lldb/test/Shell/Recognizer/Inputs/verbose_trap-in-stl-nested.cpp (revision bca507387ae1945137214ec7fb80b709927ee6e8)
1 namespace std {
2 namespace detail {
3 void function_that_aborts() { __builtin_verbose_trap("Bounds error", "out-of-bounds access"); }
4 } // namespace detail
5 
6 inline namespace __1 {
7 template <typename T> struct vector {
8   void operator[](unsigned) { detail::function_that_aborts(); }
9 };
10 } // namespace __1
11 } // namespace std
12 
13 void g() {
14   std::vector<int> v;
15   v[10];
16 }
17 
18 int main() {
19   g();
20   return 0;
21 }
22