Skip to content

Commit 408adbe

Browse files
never return nullptr in to_string_builtin_function
The default is now to return a function with no eval. This also change add a use of util_make_unique in the insert case.
1 parent c26b83d commit 408adbe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/solvers/refinement/string_refinement_util.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,7 @@ equation_symbol_mappingt::find_equations(const exprt &expr)
164164
}
165165

166166
/// Construct a string_builtin_functiont object from a function application
167-
/// \return a unique pointer to the created object, this unique pointer is empty
168-
/// if the function does not correspond to one of the supported
169-
/// builtin_functions.
167+
/// \return a unique pointer to the created object
170168
static std::unique_ptr<string_builtin_functiont> to_string_builtin_function(
171169
const function_application_exprt &fun_app,
172170
array_poolt &array_pool)
@@ -187,7 +185,8 @@ static std::unique_ptr<string_builtin_functiont> to_string_builtin_function(
187185
return util_make_unique<string_concat_char_builtin_functiont>(
188186
fun_app.arguments(), array_pool);
189187

190-
return {};
188+
return util_make_unique<string_builtin_function_with_no_evalt>(
189+
fun_app.arguments(), array_pool);
191190
}
192191

193192
string_dependenciest::string_nodet &

0 commit comments

Comments
 (0)