================
@@ -290,34 +290,29 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx,
// If there is a fixed expression, try to parse it:
if (!parse_success) {
- // Delete the expression that failed to parse before attempting to parse
- // the next expression.
- user_expression_sp.reset();
-
execution_results = lldb::eExpressionParseError;
if (!fixed_expression->empty() && options.GetAutoApplyFixIts()) {
const uint64_t max_fix_retries = options.GetRetriesWithFixIts();
for (uint64_t i = 0; i < max_fix_retries; ++i) {
// Try parsing the fixed expression.
- lldb::UserExpressionSP fixed_expression_sp(
- target->GetUserExpressionForLanguage(
- fixed_expression->c_str(), full_prefix, language, desired_type,
- options, ctx_obj, error));
- if (!fixed_expression_sp)
+ user_expression_sp.reset(target->GetUserExpressionForLanguage(
+ fixed_expression->c_str(), full_prefix, language, desired_type,
+ options, ctx_obj, error));
----------------
Michael137 wrote:
Looks like this was attempted but then reverted :)
```
commit e6cbea11578f197589801297d22b9b3bc4f1bd10
Author: Lang Hames <[email protected]>
Date: Wed Aug 28 15:49:40 2024 +1000
Revert "[lldb] unique_ptr-ify some GetUserExpression APIs. (#106034)"
This reverts commit 3c5ab5a75a9c8fb87dcb13cdf4207aa975fd6972 while I
investigate
bot failures (e.g.
https://lab.llvm.org/buildbot/#/builders/163/builds/4286).
```
Might give it a shot again
https://github.com/llvm/llvm-project/pull/177921
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits