Skip to content

Commit 33ec17e

Browse files
authored
Merge pull request #3370 from diffblue/cpp-err_location
cpp: replace err_location by error().source_location
2 parents d1a4c13 + 54c8854 commit 33ec17e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ void cpp_typecheckt::typecheck_expr_explicit_typecast(exprt &expr)
874874
::zero_initializer(expr.type(), expr.find_source_location(), *this);
875875
if(!new_expr.has_value())
876876
{
877-
err_location(expr.find_source_location());
877+
error().source_location = expr.find_source_location();
878878
error() << "cannot zero-initialize `" << to_string(expr.type()) << "'"
879879
<< eom;
880880
throw 0;

src/cpp/cpp_typecheck_initializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void cpp_typecheckt::zero_initializer(
306306
const auto value = ::zero_initializer(final_type, source_location, *this);
307307
if(!value.has_value())
308308
{
309-
err_location(source_location);
309+
error().source_location = source_location;
310310
error() << "cannot zero-initialize `" << to_string(final_type) << "'"
311311
<< eom;
312312
throw 0;

0 commit comments

Comments
 (0)