[lldb] Make Fix-Its also apply to top-level expressions
authorRaphael Isemann <teemperor@gmail.com>
Mon, 30 Mar 2020 09:50:55 +0000 (11:50 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 30 Mar 2020 09:50:57 +0000 (11:50 +0200)
commit83c81c0a469482888482983c302c09c02680ae7c
tree3a70685b9ad463d84ebb88fb0b57611eca2f707c
parent9aa884ccc2697565d7eb044fdbbec8a5db02a316
[lldb] Make Fix-Its also apply to top-level expressions

Summary:
Currently top-level expressions won't automatically get Fix-Its applied. The reason
for that is that we only set the `m_fixed_text` member if we have a wrapping
source code (I.e. `m_source_code` is not zero and is wrapping some expressions).

This patch just always sets `m_fixed_text` to get this working.

Reviewers: labath, jingham

Reviewed By: labath

Subscribers: JDevlieghere

Differential Revision: https://reviews.llvm.org/D77042
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/test/API/commands/expression/fixits/TestFixIts.py