File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 1616#include < util/expr.h>
1717#include < util/std_code.h>
1818#include < util/base_type.h>
19- #include < ansi-c/c_qualifiers.h>
2019
2120// / A naive analysis to look for casts that remove const-ness from pointers.
2221// / \param goto_program: the goto program to check
@@ -163,8 +162,6 @@ bool does_remove_constt::does_type_preserve_const_correctness(
163162bool does_remove_constt::is_type_at_least_as_const_as (
164163 const typet &type_more_const, const typet &type_compare) const
165164{
166- const c_qualifierst type_compare_qualifiers (type_compare);
167- const c_qualifierst more_constant_qualifiers (type_more_const);
168- return !type_compare_qualifiers.is_constant ||
169- more_constant_qualifiers.is_constant ;
165+ return !type_compare_qualifiers.get_bool (ID_C_constant) ||
166+ more_constant_qualifiers.get_bool (ID_C_constant);
170167}
Original file line number Diff line number Diff line change 11analyses
2- ansi-c # should go away
32goto-programs
43langapi # should go away
54pointer-analysis
Original file line number Diff line number Diff line change 1616#include < util/std_expr.h>
1717#include < util/symbol_table.h>
1818
19- #include < ansi-c/c_qualifiers.h>
20-
2119#include " goto_functions.h"
2220
2321#define LOG (message, irep ) \
@@ -786,16 +784,10 @@ bool remove_const_function_pointerst::is_const_expression(
786784// / arrays are implicitly const in C.
787785bool remove_const_function_pointerst::is_const_type (const typet &type) const
788786{
789- c_qualifierst qualifers (type);
790- if (type.id ()==ID_array)
791- {
792- c_qualifierst array_type_qualifers (type.subtype ());
793- return qualifers.is_constant || array_type_qualifers.is_constant ;
794- }
795- else
796- {
797- return qualifers.is_constant ;
798- }
787+ if (type.id () == ID_array && type.subtype ().get_bool (ID_C_constant))
788+ return true ;
789+
790+ return type.get_bool (ID_C_constant);
799791}
800792
801793// / To extract the value of the specific component within a struct
You can’t perform that action at this time.
0 commit comments