Skip to content

Commit d92596a

Browse files
author
thk123
committed
Trying a few things to fix the compile error
This commit 100% shouldn't be merged in.
1 parent f5da5c7 commit d92596a

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

src/analyses/variable-sensitivity/abstract_enviroment.cpp

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ abstract_object_pointert abstract_environmentt::eval(
5050
std::map<irep_idt, eval_handlert> handlers=
5151
{
5252
{
53-
ID_symbol, [&](const exprt &expr)
53+
ID_symbol, [&](const exprt &expr) -> abstract_object_pointert
5454
{
5555
const symbol_exprt &symbol(to_symbol_expr(expr));
5656
const auto &symbol_entry=map.find(symbol);
@@ -60,7 +60,8 @@ abstract_object_pointert abstract_environmentt::eval(
6060
}
6161
else
6262
{
63-
return symbol_entry->second;
63+
abstract_object_pointert found_symbol_value=symbol_entry->second;
64+
return found_symbol_value;
6465
}
6566
}
6667
},
@@ -146,6 +147,27 @@ abstract_object_pointert abstract_environmentt::eval(
146147
{
147148
return handler->second(simplified_expr);
148149
}
150+
151+
// Debug code to see if appveyor trips up on this similar construct.
152+
{
153+
typedef std::shared_ptr<const int> const_pointert;
154+
155+
auto lambda = [&](const int &expr) {
156+
const_pointert x(new int);
157+
const const_pointert y(new int);
158+
if(expr > 4)
159+
{
160+
return x;
161+
}
162+
else
163+
{
164+
return y;
165+
}
166+
};
167+
168+
const_pointert retx = lambda(5);
169+
const_pointert rety = lambda(3);
170+
}
149171
}
150172

151173
/*******************************************************************\

0 commit comments

Comments
 (0)