From 0883ccd9eac3b974df00e6548ee319a7dd3646f4 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 4 May 2010 16:12:48 +0000 Subject: Update clang to r103004. --- test/CodeGenCXX/destructor-debug-info.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/CodeGenCXX/destructor-debug-info.cpp (limited to 'test/CodeGenCXX/destructor-debug-info.cpp') diff --git a/test/CodeGenCXX/destructor-debug-info.cpp b/test/CodeGenCXX/destructor-debug-info.cpp new file mode 100644 index 000000000000..9e32275d3394 --- /dev/null +++ b/test/CodeGenCXX/destructor-debug-info.cpp @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -g -S -emit-llvm -o %t %s +// RUN: grep "i32 20, i32 3, metadata" %t | count 1 +// Check there is a line number entry for line 20 where b1 is destructed. +class A { int a; }; +class B { +public: + B() { a = new A; } + ~B() { delete a; } +private: + A *a; +}; + +void fn(B b); + +int i; +void foo() { + if (i) { + B b1; + fn (b1); + } +} -- cgit v1.3