[Lldb-commits] [lldb] r341535 - Reland [ClangUserExpression][NFC] Removed unused code

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 6 03:24:11 PDT 2018


Author: teemperor
Date: Thu Sep  6 03:24:11 2018
New Revision: 341535

URL: http://llvm.org/viewvc/llvm-project?rev=341535&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp?rev=341535&r1=341534&r2=341535&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp Thu Sep  6 03:24:11 2018
@@ -655,9 +655,7 @@ bool ClangUserExpression::Complete(Execu
   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());




More information about the lldb-commits mailing list