1 // RUN: %clang_cc1  -fcxx-exceptions -fexceptions -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
2 // The landing pad should have the line number of the closing brace of the function.
3 // rdar://problem/13888152
4 // CHECK: ret i32
5 // CHECK: landingpad {{.*}}
6 // CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
7 // CHECK: ![[LPAD]] = !DILocation(line: 24, column: 1, scope: !{{.*}})
8 
9 # 1 "/usr/include/c++/4.2.1/vector" 1 3
10 typedef long unsigned int __darwin_size_t;
11 typedef __darwin_size_t size_t;
12 namespace std {
13   template<typename _Tp>
14   class allocator
15   {
16   public:
17     template<typename _Tp1>
18     struct rebind
19     { typedef allocator<_Tp1> other; };
~allocator()20     ~allocator() throw() { }
21   };
22   template<typename _Tp, typename _Alloc>
23   struct _Vector_base
24   {
25     typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
26     struct _Vector_impl
27     {
_Vector_implstd::_Vector_base::_Vector_impl28       _Vector_impl(_Tp_alloc_type const& __a)      { }
29     };
30     typedef _Alloc allocator_type;
_Vector_basestd::_Vector_base31     _Vector_base(const allocator_type& __a)
32     : _M_impl(__a)
33     {  }
~_Vector_basestd::_Vector_base34     ~_Vector_base()  {  }
35     _Vector_impl _M_impl;
36   };
37   template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
38   class vector
39     : protected _Vector_base<_Tp, _Alloc>
40   {
41     typedef _Vector_base<_Tp, _Alloc> _Base;
42   public:
43     typedef _Tp value_type;
44     typedef size_t size_type;
45     typedef _Alloc allocator_type;
vector(const allocator_type & __a=allocator_type ())46     vector(const allocator_type& __a = allocator_type())
47       : _Base(__a)
48     {      }
49     size_type
push_back(const value_type & __x)50     push_back(const value_type& __x)
51     {}
52   };
53 }
54 # 10 "main.cpp" 2
55 
56 
57 
58 
main(int argc,char const * argv[],char const * envp[])59 int main (int argc, char const *argv[], char const *envp[])
60 { // 15
61   std::vector<long> longs;
62   std::vector<short> shorts;
63   for (int i=0; i<12; i++)
64     {
65       longs.push_back(i);
66       shorts.push_back(i);
67     }
68   return 0; // 23
69 } // 24
70