llvm-project/lldb/unittests/Language
Raphael Isemann 8715ffdf1a [lldb] Fix that trailing backslashes in source lines break the Clang highlighter
Summary:
Clang's raw Lexer doesn't produce any tokens for trailing backslashes in a line. This doesn't work with
LLDB's Clang highlighter which builds the source code to display from the list of tokens the Lexer returns.
This causes that lines with trailing backslashes are lacking the backslash and the following newline when
rendering source code in LLDB.

This patch removes the trailing newline from the current line we are highlighting. This way Clang doesn't
drop the backslash token and we just restore the newline after tokenising.

Fixes rdar://57091487

Reviewers: JDevlieghere, labath

Reviewed By: JDevlieghere, labath

Subscribers: labath, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70177
2019-11-14 11:11:20 +01:00
..
CPlusPlus Make CPlusPlusNameParser robust against nullptr StringRefs. 2019-05-31 00:18:42 +00:00
Highlighting [lldb] Fix that trailing backslashes in source lines break the Clang highlighter 2019-11-14 11:11:20 +01:00
CMakeLists.txt [LLDB] Added syntax highlighting support 2018-08-02 00:30:15 +00:00