Skip to content

Commit b69a501

Browse files
committed
[llvm-cxxfilt]Add test to show that empty lines can be handled
I recently discovered a bug in llvm-cxxfilt introduced in r353743 but was fixed later incidentally due to r355031. Specifically, llvm-cxxfilt was attempting to call .back() on an empty string any time there was a new line in the input. This was causing a crash in my debug builds only. This patch simply adds a test that explicitly tests that llvm-cxxfilt handles empty lines correctly. It may pass under release builds under the broken behaviour, but it fails at least in debug builds. Reviewed by: mattd Differential Revision: https://reviews.llvm.org/D58785 llvm-svn: 355929
1 parent 662c043 commit b69a501

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Show that llvm-cxxfilt can handle empty lines in the input.
2+
RUN: echo "" > %t
3+
RUN: echo "_Z3foov" >> %t
4+
RUN: echo "" >> %t
5+
RUN: llvm-cxxfilt < %t | FileCheck %s
6+
7+
CHECK: {{^$}}
8+
CHECK-NEXT: foo()
9+
CHECK-EMPTY:

0 commit comments

Comments
 (0)