Reland [ClangUserExpression][NFC] Removed unused code

The GetLanguageForExpr has side effects, so we can't remove this
call without breaking the completion mechanism. However, we can
keep the change that gets rid of this unnecessary variable.

llvm-svn: 341535
This commit is contained in:
Raphael Isemann 2018-09-06 10:24:11 +00:00
parent d25f1214a8
commit ee65d57321
1 changed files with 1 additions and 3 deletions

View File

@ -655,9 +655,7 @@ bool ClangUserExpression::Complete(ExecutionContext &exe_ctx,
if (!PrepareForParsing(diagnostic_manager, exe_ctx))
return false;
lldb::LanguageType lang_type = lldb::LanguageType::eLanguageTypeUnknown;
if (auto new_lang = GetLanguageForExpr(diagnostic_manager, exe_ctx))
lang_type = new_lang.getValue();
GetLanguageForExpr(diagnostic_manager, exe_ctx);
if (log)
log->Printf("Parsing the following code:\n%s", m_transformed_text.c_str());