summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp
blob: e859b04e3a99926f9dde85d67669e940c53d6f95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <stdexcept>

int twelve(int i) {
  return 12 + i; // break 12
}

int thirteen(int i) {
  return 13 + i; // break 13
}

namespace a {
  int fourteen(int i) {
    return 14 + i; // break 14
  }
}
int main(int argc, char const *argv[]) {
  for (int i=0; i<10; ++i) {
    int x = twelve(i) + thirteen(i) + a::fourteen(i); // break loop
  }
  try {
    throw std::invalid_argument( "throwing exception for testing" );
  } catch (...) {
    puts("caught exception...");
  }
  return 0;
}