[Lldb-commits] [lldb] 3590a83 - [lldb] Fix bug instroduced by a00acbab45b0

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 22 22:17:18 PDT 2020


Author: Jonas Devlieghere
Date: 2020-10-22T22:17:11-07:00
New Revision: 3590a8319a5fb491cba2349509910c2479f49a00

URL: https://github.com/llvm/llvm-project/commit/3590a8319a5fb491cba2349509910c2479f49a00
DIFF: https://github.com/llvm/llvm-project/commit/3590a8319a5fb491cba2349509910c2479f49a00.diff

LOG: [lldb] Fix bug instroduced by a00acbab45b0

g_expression_prefix, as the name implies, must be perfixed, not
suffixed.

Added: 
    

Modified: 
    lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
index 5fdb7b4f4d9c..9788a4e1c183 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -43,9 +43,10 @@ char ClangUtilityFunction::ID;
 ///     The name of the function, as used in the text.
 ClangUtilityFunction::ClangUtilityFunction(ExecutionContextScope &exe_scope,
                                            std::string text, std::string name)
-    : UtilityFunction(exe_scope, std::move(text), std::move(name)) {
-  m_function_text.assign(ClangExpressionSourceCode::g_expression_prefix);
-}
+    : UtilityFunction(
+          exe_scope,
+          std::string(ClangExpressionSourceCode::g_expression_prefix) + text,
+          std::move(name)) {}
 
 ClangUtilityFunction::~ClangUtilityFunction() {}
 


        


More information about the lldb-commits mailing list