llvm-project/lldb
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
..
cmake [LLDB] Remove debug message in AddLLDB.cmake 2019-11-12 15:33:03 -08:00
docs lldb/docs: update the lldb-x86_64-debian bot url 2019-11-06 16:02:23 +01:00
examples crashlog.py: Improve regular expressions 2019-11-07 10:52:06 -08:00
include/lldb [lldb][NFC] Simplify IOHandler constructor/destructor setup 2019-11-14 09:59:00 +01:00
packages/Python/lldbsuite [LLDB] Fix whitespace/tabs mismatch in lldbsuite Makefile.rules 2019-11-14 13:53:58 +05:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [LLDB][Python] remove ArgInfo::count 2019-11-04 12:48:49 -08:00
source [lldb] Fix that trailing backslashes in source lines break the Clang highlighter 2019-11-14 11:11:20 +01:00
test [Reproducer] Discard reproducer directory if not generated. 2019-11-12 20:16:33 -08:00
third_party/Python/module Increase timeout in pexpect to lower chances of tests failing under ASAN. 2019-10-10 16:16:49 +00:00
tools [LLDB] Don't install the pretty stack trace handler twice. 2019-11-13 17:35:58 -08:00
unittests [lldb] Fix that trailing backslashes in source lines break the Clang highlighter 2019-11-14 11:11:20 +01:00
utils [LLDB] Fix inline variable only used in assertion. (NFC) 2019-10-25 15:47:17 -07:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb] Record framework build path and use it everywhere 2019-11-06 14:05:35 -08:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py