Skip to content

Commit 25e0ff8

Browse files
committed
Update code to work with expr2cleanct from diffblue#2704
1 parent 28e2d4d commit 25e0ff8

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

regression/memory-analyzer/arrays/test.desc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ arrays.exe
44
analyzing symbol: test_struct
55
GENERATED CODE:
66
\{
7-
char _test_struct_childs0_options0_text_1\[7l\]="accept";
8-
char _test_struct_childs0_options1_text_2\[8l\]="unique0";
9-
char _test_struct_childs1_options1_text_3\[8l\]="unique1";
10-
char _test_struct_childs2_options1_text_4\[8l\]="unique2";
11-
char _test_struct_childs3_options1_text_5\[8l\]="unique3";
7+
char _test_struct_childs0_options0_text_1\[\]="accept";
8+
char _test_struct_childs0_options1_text_2\[\]="unique0";
9+
char _test_struct_childs1_options1_text_3\[\]="unique1";
10+
char _test_struct_childs2_options1_text_4\[\]="unique2";
11+
char _test_struct_childs3_options1_text_5\[\]="unique3";
1212
struct a_typet test_struct_0=\{ .config=\{ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 \}, .initalized=0,
1313
.values=\{ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171 \}, .childs=\{ \{ .id=12, .options=\{ \{ .text=\(char \*\)&_test_struct_childs0_options0_text_1 \},
1414
\{ .text=\(char \*\)&_test_struct_childs0_options1_text_2 \} \} \},

regression/memory-analyzer/cycles/test.desc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ cycles.exe
44
analyzing symbol: buffer
55
GENERATED CODE:
66
\{
7-
char _buffer_start_data_1\[5l\]="snow";
8-
char __buffer_start_next_data_3\[4l\]="sun";
9-
char ___buffer_start_next_next_data_5\[5l\]="rain";
10-
char ____buffer_start_next_next_next_data_7\[14l\]="thunder storm";
7+
char _buffer_start_data_1\[\]="snow";
8+
char __buffer_start_next_data_3\[\]="sun";
9+
char ___buffer_start_next_next_data_5\[\]="rain";
10+
char ____buffer_start_next_next_next_data_7\[\]="thunder storm";
1111
struct cycle_buffer_entry ___buffer_start_next_next_next_6=\{ .data=\(char \*\)&____buffer_start_next_next_next_data_7, .next=\(\(struct cycle_buffer_entry \*\)NULL\) \};
1212
struct cycle_buffer_entry __buffer_start_next_next_4=\{ .data=\(char \*\)&___buffer_start_next_next_data_5, .next=&___buffer_start_next_next_next_6 \};
1313
struct cycle_buffer_entry _buffer_start_next_2=\{ .data=\(char \*\)&__buffer_start_next_data_3, .next=&__buffer_start_next_next_4 \};

regression/memory-analyzer/primitive_types/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ GENERATED CODE:
1212
e = 17;
1313
f = &e;
1414
f_1 = &e;
15-
char d_b_0\[6l\]="test2";
15+
char d_b_0\[\]="test2";
1616
d.a = 4;
1717
d.b = \(char \*\)&d_b_0;
1818
d.c = -32;
1919
struct mapping_things g_1=\{ .a=0, .b=\(\(char \*\)NULL\), .c=0 \};
2020
g = &g_1;
21-
char h_2\[5l\]="test";
21+
char h_2\[\]="test";
2222
h = \(char \*\)&h_2;
2323
}
2424
^EXIT=0

regression/memory-analyzer/void_pointer/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ analyzing symbol: blob
55
GENERATED CODE:
66
\{
77
a_void_pointer = NULL;
8-
char char_a_second_void_pointer_0\[12l\]="test_string";
8+
char char_a_second_void_pointer_0\[\]="test_string";
99
a_second_void_pointer = \(char \*\)&char_a_second_void_pointer_0;
10-
char char_a_third_void_pointer_1\[7ul\]=\{ -13, -13, 'H', -1, '\\\\', '\\\\', -1 \};
10+
char char_a_third_void_pointer_1\[\]=\{ -13, -13, 'H', -1, '\\\\', '\\\\', -1 \};
1111
a_third_void_pointer = \(char \*\)&char_a_third_void_pointer_1;
1212
blob.size = 7;
1313
blob.data = \(char \*\)&char_a_third_void_pointer_1;

src/memory-analyzer/analyze_symbol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <map>
66
#include <string>
77

8-
#include <ansi-c/expr2c_class.h>
8+
#include <ansi-c/expr2cleanc.h>
99
#include <util/message.h>
1010
#include <util/namespace.h>
1111
#include <util/std_code.h>
@@ -28,7 +28,7 @@ class symbol_analyzert : public messaget
2828
private:
2929
gdb_apit &gdb_api;
3030
const namespacet ns;
31-
expr2c_pretty_structt c_converter;
31+
expr2cleanct c_converter;
3232

3333
code_blockt generated_code;
3434
size_t id_counter;

0 commit comments

Comments
 (0)