swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.12k stars 331 forks source link

[🍒 swift/release/6.1] [lldb] Make sure completions don't end with newlines (#117054) #9661

Open JDevlieghere opened 1 day ago

JDevlieghere commented 1 day ago

The logic that prints completions and their descriptions assumes neither the completion itself nor the description ends with a newline. I considered making this an assert, but decided against it as completions can indirectly come from user input (e.g. oddly crafted names). Instead, avoid the potential for mistakes by defensively stripping them.

(cherry picked from commit 4b5a8d6835897477873242ef1ee529d00dedd9a1)

JDevlieghere commented 1 day ago

@swift-ci test