-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyses: Replace uses of namespacet::follow
This is deprecated. Use suitable variants of `follow_tag` instead.
- Loading branch information
1 parent
1939544
commit 2ff2a46
Showing
9 changed files
with
61 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "invariant_propagation.h" | ||
|
||
#include <util/c_types.h> | ||
#include <util/simplify_expr.h> | ||
#include <util/std_expr.h> | ||
|
||
|
@@ -131,7 +132,10 @@ void invariant_propagationt::get_objects_rec( | |
t.id() == ID_struct || t.id() == ID_union || t.id() == ID_struct_tag || | ||
t.id() == ID_union_tag) | ||
{ | ||
const struct_union_typet &struct_type = to_struct_union_type(ns.follow(t)); | ||
const struct_union_typet &struct_type = | ||
t.id() == ID_struct_tag ? ns.follow_tag(to_struct_tag_type(t)) | ||
: t.id() == ID_union_tag ? ns.follow_tag(to_union_tag_type(t)) | ||
: to_struct_union_type(t); | ||
|
||
for(const auto &component : struct_type.components()) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,18 @@ Author: Thomas Kiley, [email protected] | |
\*******************************************************************/ | ||
|
||
#include <ostream> | ||
#include "full_struct_abstract_object.h" | ||
|
||
#include <analyses/variable-sensitivity/abstract_environment.h> | ||
#include <util/c_types.h> | ||
#include <util/std_expr.h> | ||
|
||
#include "full_struct_abstract_object.h" | ||
#include <analyses/variable-sensitivity/abstract_environment.h> | ||
|
||
#include "location_update_visitor.h" | ||
#include "map_visit.h" | ||
|
||
#include <ostream> | ||
|
||
// #define DEBUG | ||
|
||
#ifdef DEBUG | ||
|
@@ -43,9 +46,11 @@ full_struct_abstract_objectt::full_struct_abstract_objectt( | |
const namespacet &ns) | ||
: abstract_aggregate_baset(e, environment, ns) | ||
{ | ||
PRECONDITION(ns.follow(e.type()).id() == ID_struct); | ||
PRECONDITION(e.type().id() == ID_struct || e.type().id() == ID_struct_tag); | ||
|
||
const struct_typet struct_type_def = to_struct_type(ns.follow(e.type())); | ||
const struct_typet &struct_type_def = | ||
e.type().id() == ID_struct ? to_struct_type(e.type()) | ||
: ns.follow_tag(to_struct_tag_type(e.type())); | ||
|
||
bool did_initialize_values = false; | ||
auto struct_type_it = struct_type_def.components().begin(); | ||
|
@@ -204,7 +209,10 @@ void full_struct_abstract_objectt::output( | |
// To ensure that a consistent ordering of fields is output, use | ||
// the underlying type declaration for this struct to determine | ||
// the ordering | ||
struct_union_typet type_decl = to_struct_union_type(ns.follow(type())); | ||
struct_union_typet type_decl = | ||
type().id() == ID_struct_tag ? ns.follow_tag(to_struct_tag_type(type())) | ||
: type().id() == ID_union_tag ? ns.follow_tag(to_union_tag_type(type())) | ||
: to_struct_union_type(type()); | ||
|
||
bool first = true; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters