aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/Recognizer/Inputs/verbose_trap-in-stl-nested.cpp
blob: 67fa65c9ceae22b57f1e74c5af45a6c0805d8bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace std {
namespace detail {
void function_that_aborts() { __builtin_verbose_trap("Bounds error", "out-of-bounds access"); }
} // namespace detail

inline namespace __1 {
template <typename T> struct vector {
  void operator[](unsigned) { detail::function_that_aborts(); }
};
} // namespace __1
} // namespace std

void g() {
  std::vector<int> v;
  v[10];
}

int main() {
  g();
  return 0;
}