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
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());