brintos

brintos / llvm-project-archived public Read only

0
0
Text · 698 B · 9ecef34 Raw
44 lines · c
1template<typename _Tp>2class auto_ptr {3private:4  _Tp* _M_ptr;5public: 6  auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) { }7  ~auto_ptr() { delete _M_ptr; }8};9 10void cause_div_by_zero_in_header(int in) {11  int h = 0;12  h = in/h;13  h++;14}15 16void do_something (int in) {17  in++;18  in++;19}20 21void cause_div_by_zero_in_header2(int in) {22  int h2 = 0;23  h2 = in/h2;24  h2++;25}26 27# define CALLS_BUGGY_FUNCTION2 cause_div_by_zero_in_header2(5);28 29void cause_div_by_zero_in_header3(int in) {30  int h3 = 0;31  h3 = in/h3;32  h3++;33}34 35# define CALLS_BUGGY_FUNCTION3 cause_div_by_zero_in_header3(5);36 37void cause_div_by_zero_in_header4(int in) {38  int h4 = 0;39  h4 = in/h4;40  h4++;41}42 43# define TAKE_CALL_AS_ARG(c) c;44