Skip to content

show-properties: do not skip functions marked for inlining #3308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions regression/cbmc/show_properties1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
inline int foo()
{
int *p;
return *p;
}

int main()
{
foo();
return 0;
}
8 changes: 8 additions & 0 deletions regression/cbmc/show_properties1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
main.c
--pointer-check --show-properties
^EXIT=0$
^SIGNAL=0$
^Property foo.pointer_dereference.1:$
--
^warning: ignoring
6 changes: 2 additions & 4 deletions src/goto-programs/show_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ void show_properties_json(
json_arrayt json_properties;

for(const auto &fct : goto_functions.function_map)
if(!fct.second.is_inlined())
convert_properties_json(json_properties, ns, fct.first, fct.second.body);
convert_properties_json(json_properties, ns, fct.first, fct.second.body);

json_objectt json_result;
json_result["properties"] = json_properties;
Expand All @@ -170,8 +169,7 @@ void show_properties(
show_properties_json(ns, message_handler, goto_functions);
else
for(const auto &fct : goto_functions.function_map)
if(!fct.second.is_inlined())
show_properties(ns, fct.first, message_handler, ui, fct.second.body);
show_properties(ns, fct.first, message_handler, ui, fct.second.body);
}

void show_properties(
Expand Down