diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
| commit | 0883ccd9eac3b974df00e6548ee319a7dd3646f4 (patch) | |
| tree | d6a70c3518b8dea8be7062438d7e8676820ed17f /test/CodeGenCXX/destructor-debug-info.cpp | |
| parent | 60bfabcd8ce617297c0d231f77d14ab507e98796 (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/destructor-debug-info.cpp')
| -rw-r--r-- | test/CodeGenCXX/destructor-debug-info.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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); + } +} |
