This is an archive of the discontinued LLVM Phabricator instance.

[llvm-cxxfilt]Add test to show that empty lines can be handled
ClosedPublic

Authored by jhenderson on Feb 28 2019, 6:41 AM.

Details

Summary

I recently discovered a bug in llvm-cxxfilt introduced in rL353743 but was fixed later incidentally due to rL355031. 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.

Note: a FileCheck assertion means that D58784 needs to land before this test can land.

Diff Detail

Repository
rL LLVM

Event Timeline

jhenderson created this revision.Feb 28 2019, 6:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2019, 6:41 AM
mattd accepted this revision.Feb 28 2019, 9:02 AM

LGTM

This revision is now accepted and ready to land.Feb 28 2019, 9:02 AM
This revision was automatically updated to reflect the committed changes.