[Lldb-commits] [lldb] r341532 - Revert "[ClangUserExpression][NFC] Removed unused code"
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 6 02:42:44 PDT 2018
Author: teemperor
Date: Thu Sep 6 02:42:44 2018
New Revision: 341532
URL: http://llvm.org/viewvc/llvm-project?rev=341532&view=rev
Log:
Revert "[ClangUserExpression][NFC] Removed unused code"
GetLanguageForExpr has side effects, so this actually breaks
the completion. Should fix TestExprCompletion.
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=341532&r1=341531&r2=341532&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp Thu Sep 6 02:42:44 2018
@@ -655,6 +655,10 @@ 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();
+
if (log)
log->Printf("Parsing the following code:\n%s", m_transformed_text.c_str());
More information about the lldb-commits
mailing list