Skip to content

Commit e7ed234

Browse files
Squashed 'cbmc/' changes from 54f3731..6a10f1a
6a10f1a Merge pull request diffblue#2462 from tautschnig/vs-goto-inline 96fc7b1 Merge pull request diffblue#2654 from peterschrammel/update-jml8 1847066 Update jbmc/lib/java-models-library to java-models-library#8 (remove sun.* imports) c157ba7 Revert "CMake version.cpp: switch back to add_custom_target" 7a009d6 Merge pull request diffblue#2650 from diffblue/aws-codebuild-clcache 63652fc add clcache to Windows build 6f72b3b Merge pull request diffblue#2657 from smowton/smowton/fix/cmake-version-cpp 35d09d5 CMake version.cpp: switch back to add_custom_target 80331d8 Merge pull request diffblue#2638 from diffblue/CBMC_VERSION_string 7c066f9 Merge pull request diffblue#2618 from owen-jones-diffblue/doc/move-irep-docs-from-util-to-irep ad5c375 use a string instead of macro for version number b6258db Merge pull request diffblue#2509 from danpoe/feature/sharing-map-stats eb71a01 Merge pull request diffblue#2639 from thk123/array-element-type c5519ec Merge pull request diffblue#2640 from allredj/support-for-load-containing-class-only 0855872 Address review comments diffblue#2 eaa7664 Wrap lines properly e682eb9 Add \ref in lots of places 3023cca Address review comments 758f069 Move dstringt documentation to above dstringt a54c82d Move documentation of irept to be above irept b827ea4 Use type equality check in unit tests 77185fd Merge pull request diffblue#2607 from jeannielynnmoulton/jeannie/ParseThrownExceptions2 1f4ef40 Add class loader debug output 4ae8eb6 Move sharing map friends declarations to unit tests 186897c Sharing stats for the sharing map 4438b43 Fix sharing map internal assertion 332febe Remove wrong sharing map internal assertions be7e140 Activate internal checks for the sharing map unit tests 713d3fe Merge pull request diffblue#2636 from polgreen/fix_function_map 87f90ee Add replace_all string utility ea2d393 Make test work on windows 4fa9943 Make array element type be not a comment 655248a Add unit test for when there are no exceptions. a6e7c4b Refactors interface for exceptions to not use irepts. 1134bba Creates java_method_typet which extends code_typet aa83622 Unit tests method get_super_class 565c999 Unit tests throws exceptions parsing. eb88509 Use parsed information for thrown exceptions. 5c7dcac Parses the exception attribute 7fcc42d Adds const to get/set_outer_class 5994dd8 Add method to get super class from java class type. fbad2d9 Rename variable extends to super_class 6d0776f if function is not in the function map, treat as if it has no body da86bdb Merge pull request diffblue#2602 from diffblue/__CPROVER_r/w_ok 0202f34 refactor pointer_validity_check using address_check 4a24ad4 use __CPROVER_r/w_ok in string.c library 732ce2a expand __CPROVER_r/w_ok in goto_check acfea65 __CPROVER_r_ok and __CPROVER_w_ok added to ANSI-C front-end 0618f7d Merge pull request diffblue#2628 from diffblue/clang-extensions 5e43131 Merge pull request diffblue#2608 from diffblue/ms_cl_int64 7c56091 Merge pull request diffblue#2634 from qaphla/local_bitvector_analysis_regression 44ef8d5 Merge pull request diffblue#2630 from diffblue/invalid-pointer-flattening f74c161 test for __float80 and __float128 8288a72 __float80 is a typedef, not a keyword 5495625 FreeBSD: default flavor is now CLANG e63402e added _Null_unspecified clang extension 16a49a7 bugfix: __float128 3849bb0 rename APPLE flavor to CLANG 060b59c separate pointer check for integer addresses 9b5847e fix flattening of ID_invalid_pointer 432dcf1 Added a regression test checking that --pointer-check does not generate excess checks if local_bitvector_analysis can gather information on the pointer being checked. cbfcc5c added support for _int64 keyword 0148347 Avoid signed/unsigned casts and conversion in goto_inline git-subtree-dir: cbmc git-subtree-split: 6a10f1a
1 parent 6e8b329 commit e7ed234

File tree

85 files changed

+1503
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1503
-574
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Release/*
2828
*.obj
2929
*.a
3030
*.lib
31-
version.h
31+
util/version.cpp
3232
src/ansi-c/arm_builtin_headers.inc
3333
src/ansi-c/clang_builtin_headers.inc
3434
src/ansi-c/cprover_builtin_headers.inc

buildspec-windows.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ phases:
55
commands:
66
- choco install cyg-get -y --no-progress
77
- cyg-get bash patch bison flex make wget perl
8+
- nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
89

910
build:
1011
commands:
@@ -13,14 +14,22 @@ phases:
1314
C:\tools\cygwin\bin\bash -c "make -C src minisat2-download DOWNLOADER=wget"
1415
1516
- |
16-
$env:Path = "C:\tools\cygwin\bin;$env:Path"
17-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C src BUILD_ENV=MSVC" '
18-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C unit all BUILD_ENV=MSVC" '
17+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
18+
$env:CLCACHE_DIR = "C:\clcache"
19+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C src BUILD_ENV=MSVC" '
20+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C unit all BUILD_ENV=MSVC" '
1921
2022
- |
21-
$env:Path = "C:\tools\cygwin\bin;$env:Path"
22-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make -j4 -C jbmc/src BUILD_ENV=MSVC" '
23-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/unit all BUILD_ENV=MSVC" '
23+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
24+
$env:CLCACHE_DIR = "C:\clcache"
25+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make CXX=clcache.exe -j4 -C jbmc/src BUILD_ENV=MSVC" '
26+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C jbmc/unit all BUILD_ENV=MSVC" '
27+
28+
- |
29+
# display cache stats
30+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
31+
$env:CLCACHE_DIR = "C:\clcache"
32+
cmd /c 'clcache -s'
2433
2534
post_build:
2635
commands:
@@ -72,3 +81,4 @@ artifacts:
7281

7382
cache:
7483
paths:
84+
- 'c:\clcache'

doc/cbmc-user-manual.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,6 +2190,15 @@ to the program. If the expression evaluates to false, the execution
21902190
aborts without failure. More detail on the use of assumptions is in the
21912191
section on [Assumptions and Assertions](modeling-assertions.shtml).
21922192

2193+
#### \_\_CPROVER\_r_ok, \_\_CPROVER\_w_ok
2194+
2195+
void __CPROVER_r_ok(const void *, size_t size);
2196+
void __CPROVER_w_ok(cosnt void *, size_t size);
2197+
2198+
The function **\_\_CPROVER\_r_ok** returns true if reading the piece of
2199+
memory starting at the given pointer with the given size is safe.
2200+
**\_\_CPROVER\_w_ok** does the same with writing.
2201+
21932202
#### \_\_CPROVER\_same\_object, \_\_CPROVER\_POINTER\_OBJECT, \_\_CPROVER\_POINTER\_OFFSET, \_\_CPROVER\_DYNAMIC\_OBJECT
21942203

21952204
_Bool __CPROVER_same_object(const void *, const void *);

jbmc/src/janalyzer/janalyzer_parse_options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Author: Daniel Kroening, [email protected]
6060
janalyzer_parse_optionst::janalyzer_parse_optionst(int argc, const char **argv)
6161
: parse_options_baset(JANALYZER_OPTIONS, argc, argv),
6262
messaget(ui_message_handler),
63-
ui_message_handler(cmdline, "JANALYZER " CBMC_VERSION)
63+
ui_message_handler(cmdline, std::string("JANALYZER ") + CBMC_VERSION)
6464
{
6565
}
6666

@@ -342,7 +342,7 @@ int janalyzer_parse_optionst::doit()
342342
//
343343
// Print a banner
344344
//
345-
status() << "JANALYZER version " CBMC_VERSION " " << sizeof(void *) * 8
345+
status() << "JANALYZER version " << CBMC_VERSION << " " << sizeof(void *) * 8
346346
<< "-bit " << config.this_architecture() << " "
347347
<< config.this_operating_system() << eom;
348348

jbmc/src/java_bytecode/java_bytecode_convert_class.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ void java_bytecode_convert_classt::convert(
280280
class_type.set_is_static_class(c.is_static_class);
281281
class_type.set_is_anonymous_class(c.is_anonymous_class);
282282
class_type.set_outer_class(c.outer_class);
283+
class_type.set_super_class(c.super_class);
283284
if(c.is_enum)
284285
{
285286
if(max_array_length != 0 && c.enum_elements > max_array_length)
@@ -303,9 +304,9 @@ void java_bytecode_convert_classt::convert(
303304
else
304305
class_type.set_access(ID_default);
305306

306-
if(!c.extends.empty())
307+
if(!c.super_class.empty())
307308
{
308-
const symbol_typet base("java::" + id2string(c.extends));
309+
const symbol_typet base("java::" + id2string(c.super_class));
309310

310311
// if the superclass is generic then the class has the superclass reference
311312
// including the generic info in its signature
@@ -323,7 +324,7 @@ void java_bytecode_convert_classt::convert(
323324
}
324325
catch(const unsupported_java_class_signature_exceptiont &e)
325326
{
326-
warning() << "Superclass: " << c.extends << " of class: " << c.name
327+
warning() << "Superclass: " << c.super_class << " of class: " << c.name
327328
<< "\n could not parse signature: " << superclass_ref.value()
328329
<< "\n " << e.what()
329330
<< "\n ignoring that the superclass is generic" << eom;
@@ -336,9 +337,9 @@ void java_bytecode_convert_classt::convert(
336337
}
337338
class_typet::componentt base_class_field;
338339
base_class_field.type() = class_type.bases().at(0).type();
339-
base_class_field.set_name("@"+id2string(c.extends));
340-
base_class_field.set_base_name("@"+id2string(c.extends));
341-
base_class_field.set_pretty_name("@"+id2string(c.extends));
340+
base_class_field.set_name("@" + id2string(c.super_class));
341+
base_class_field.set_base_name("@" + id2string(c.super_class));
342+
base_class_field.set_pretty_name("@" + id2string(c.super_class));
342343
class_type.components().push_back(base_class_field);
343344
}
344345

@@ -561,7 +562,7 @@ void java_bytecode_convert_classt::convert(
561562
}
562563

563564
// is this a root class?
564-
if(c.extends.empty())
565+
if(c.super_class.empty())
565566
java_root_class(*class_symbol);
566567
}
567568

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ void java_bytecode_convert_methodt::convert(
444444

445445
// Obtain a std::vector of code_typet::parametert objects from the
446446
// (function) type of the symbol
447-
code_typet code_type = to_code_type(method_symbol.type);
448-
code_type.set(ID_C_class, class_symbol.name);
449-
method_return_type=code_type.return_type();
450-
code_typet::parameterst &parameters=code_type.parameters();
447+
java_method_typet method_type = to_java_method_type(method_symbol.type);
448+
method_type.set(ID_C_class, class_symbol.name);
449+
method_return_type = method_type.return_type();
450+
code_typet::parameterst &parameters = method_type.parameters();
451451

452-
// Determine the number of local variable slots used by the JVM to maintan the
453-
// formal parameters
454-
slots_for_parameters=java_method_parameter_slots(code_type);
452+
// Determine the number of local variable slots used by the JVM to maintain
453+
// the formal parameters
454+
slots_for_parameters = java_method_parameter_slots(method_type);
455455

456456
debug() << "Generating codet: class "
457457
<< class_symbol.name << ", method "
@@ -587,7 +587,10 @@ void java_bytecode_convert_methodt::convert(
587587
method_symbol.location=m.source_location;
588588
method_symbol.location.set_function(method_identifier);
589589

590-
const std::string signature_string = pretty_signature(code_type);
590+
for(const auto &exception_name : m.throws_exception_table)
591+
method_type.add_throws_exceptions(exception_name);
592+
593+
const std::string signature_string = pretty_signature(method_type);
591594

592595
// Set up the pretty name for the method entry in the symbol table.
593596
// The pretty name of a constructor includes the base name of the class
@@ -601,7 +604,7 @@ void java_bytecode_convert_methodt::convert(
601604
method_symbol.pretty_name =
602605
id2string(class_symbol.pretty_name) + signature_string;
603606
INVARIANT(
604-
code_type.get_is_constructor(),
607+
method_type.get_is_constructor(),
605608
"Member type should have already been marked as a constructor");
606609
}
607610
else
@@ -610,14 +613,13 @@ void java_bytecode_convert_methodt::convert(
610613
id2string(m.base_name) + signature_string;
611614
}
612615

613-
method_symbol.type = code_type;
614-
615-
current_method=method_symbol.name;
616-
method_has_this=code_type.has_this();
616+
method_symbol.type = method_type;
617+
current_method = method_symbol.name;
618+
method_has_this = method_type.has_this();
617619
if((!m.is_abstract) && (!m.is_native))
618620
method_symbol.value = convert_instructions(
619621
m,
620-
code_type,
622+
method_type,
621623
method_symbol.name,
622624
to_java_class_type(class_symbol.type).lambda_method_handles());
623625
}

jbmc/src/java_bytecode/java_bytecode_parse_tree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ void java_bytecode_parse_treet::classt::output(std::ostream &out) const
3838
}
3939

4040
out << "class " << name;
41-
if(!extends.empty())
42-
out << " extends " << extends;
41+
if(!super_class.empty())
42+
out << " extends " << super_class;
4343
out << " {" << '\n';
4444

4545
for(fieldst::const_iterator

jbmc/src/java_bytecode/java_bytecode_parse_tree.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ struct java_bytecode_parse_treet
114114
typedef std::vector<exceptiont> exception_tablet;
115115
exception_tablet exception_table;
116116

117+
std::vector<irep_idt> throws_exception_table;
118+
117119
struct local_variablet
118120
{
119121
irep_idt name;
@@ -197,7 +199,7 @@ struct java_bytecode_parse_treet
197199
classt &operator=(classt &&) = default;
198200
#endif
199201

200-
irep_idt name, extends;
202+
irep_idt name, super_class;
201203
bool is_abstract=false;
202204
bool is_enum=false;
203205
bool is_public=false, is_protected=false, is_private=false;

jbmc/src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ class java_bytecode_parsert:public parsert
121121
void rmethod(classt &parsed_class);
122122
void
123123
rinner_classes_attribute(classt &parsed_class, const u4 &attribute_length);
124+
std::vector<irep_idt> rexceptions_attribute();
124125
void rclass_attribute(classt &parsed_class);
125126
void rRuntimeAnnotation_attribute(annotationst &);
126127
void rRuntimeAnnotation(annotationt &);
@@ -503,8 +504,7 @@ void java_bytecode_parsert::rClassFile()
503504
constant(this_class).type().get(ID_C_base_name);
504505

505506
if(super_class!=0)
506-
parsed_class.extends=
507-
constant(super_class).type().get(ID_C_base_name);
507+
parsed_class.super_class = constant(super_class).type().get(ID_C_base_name);
508508

509509
rinterfaces(parsed_class);
510510
rfields(parsed_class);
@@ -621,8 +621,8 @@ void java_bytecode_parsert::get_class_refs_rec(const typet &src)
621621
irep_idt name=src.get(ID_C_base_name);
622622
if(has_prefix(id2string(name), "array["))
623623
{
624-
const typet &element_type=
625-
static_cast<const typet &>(src.find(ID_C_element_type));
624+
const typet &element_type =
625+
static_cast<const typet &>(src.find(ID_element_type));
626626
get_class_refs_rec(element_type);
627627
}
628628
else
@@ -1243,6 +1243,10 @@ void java_bytecode_parsert::rmethod_attribute(methodt &method)
12431243
{
12441244
rRuntimeAnnotation_attribute(method.annotations);
12451245
}
1246+
else if(attribute_name == "Exceptions")
1247+
{
1248+
method.throws_exception_table = rexceptions_attribute();
1249+
}
12461250
else
12471251
skip_bytes(attribute_length);
12481252
}
@@ -1655,6 +1659,26 @@ void java_bytecode_parsert::rinner_classes_attribute(
16551659
}
16561660
}
16571661

1662+
/// Corresponds to the element_value structure
1663+
/// Described in Java 8 specification 4.7.5
1664+
/// https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.5
1665+
/// Parses the Exceptions attribute for the current method,
1666+
/// and returns a vector of exceptions.
1667+
std::vector<irep_idt> java_bytecode_parsert::rexceptions_attribute()
1668+
{
1669+
u2 number_of_exceptions = read_u2();
1670+
1671+
std::vector<irep_idt> exceptions;
1672+
for(size_t i = 0; i < number_of_exceptions; i++)
1673+
{
1674+
u2 exception_index_table = read_u2();
1675+
const irep_idt exception_name =
1676+
constant(exception_index_table).type().get(ID_C_base_name);
1677+
exceptions.push_back(exception_name);
1678+
}
1679+
return exceptions;
1680+
}
1681+
16581682
void java_bytecode_parsert::rclass_attribute(classt &parsed_class)
16591683
{
16601684
u2 attribute_name_index=read_u2();

jbmc/src/java_bytecode/java_class_loader_limit.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ void java_class_loader_limitt::setup_class_load_limit(
2424
// '@' signals file reading with list of class files to load
2525
use_regex_match = java_cp_include_files[0] != '@';
2626
if(use_regex_match)
27+
{
2728
regex_matcher=std::regex(java_cp_include_files);
29+
debug() << "Limit loading to classes matching '" << java_cp_include_files
30+
<< "'" << eom;
31+
}
2832
else
2933
{
3034
assert(java_cp_include_files.length()>1);
@@ -54,7 +58,10 @@ bool java_class_loader_limitt::load_class_file(const std::string &file_name)
5458
if(use_regex_match)
5559
{
5660
std::smatch string_matches;
57-
return std::regex_match(file_name, string_matches, regex_matcher);
61+
if(std::regex_match(file_name, string_matches, regex_matcher))
62+
return true;
63+
debug() << file_name + " discarded since not matching loader regexp" << eom;
64+
return false;
5865
}
5966
else
6067
// load .class file only if it is in the match set

jbmc/src/java_bytecode/java_object_factory.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ void java_object_factoryt::allocate_nondet_length_array(
12531253
side_effect_exprt java_new_array(ID_java_new_array, lhs.type());
12541254
java_new_array.copy_to_operands(length_sym_expr);
12551255
java_new_array.set(ID_length_upper_bound, max_length_expr);
1256-
java_new_array.type().subtype().set(ID_C_element_type, element_type);
1256+
java_new_array.type().subtype().set(ID_element_type, element_type);
12571257
code_assignt assign(lhs, java_new_array);
12581258
assign.add_source_location()=loc;
12591259
assignments.copy_to_operands(assign);
@@ -1277,8 +1277,8 @@ void java_object_factoryt::gen_nondet_array_init(
12771277

12781278
const typet &type=ns.follow(expr.type().subtype());
12791279
const struct_typet &struct_type=to_struct_type(type);
1280-
const typet &element_type=
1281-
static_cast<const typet &>(expr.type().subtype().find(ID_C_element_type));
1280+
const typet &element_type =
1281+
static_cast<const typet &>(expr.type().subtype().find(ID_element_type));
12821282

12831283
auto max_length_expr=from_integer(
12841284
object_factory_parameters.max_nondet_array_length, java_int_type());

jbmc/src/java_bytecode/java_types.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ reference_typet java_lang_object_type()
8888
}
8989

9090
/// Construct an array pointer type. It is a pointer to a symbol with identifier
91-
/// java::array[]. Its ID_C_element_type is set to the corresponding primitive
91+
/// java::array[]. Its ID_element_type is set to the corresponding primitive
9292
/// type, or void* for arrays of references.
9393
/// \param subtype Character indicating the type of array
9494
reference_typet java_array_type(const char subtype)
@@ -119,7 +119,7 @@ reference_typet java_array_type(const char subtype)
119119

120120
symbol_typet symbol_type("java::"+id2string(class_name));
121121
symbol_type.set(ID_C_base_name, class_name);
122-
symbol_type.set(ID_C_element_type, java_type_from_char(subtype));
122+
symbol_type.set(ID_element_type, java_type_from_char(subtype));
123123

124124
return java_reference_type(symbol_type);
125125
}
@@ -131,7 +131,7 @@ const typet &java_array_element_type(const symbol_typet &array_symbol)
131131
DATA_INVARIANT(
132132
is_java_array_tag(array_symbol.get_identifier()),
133133
"Symbol should have array tag");
134-
return array_symbol.find_type(ID_C_element_type);
134+
return array_symbol.find_type(ID_element_type);
135135
}
136136

137137
/// Return a non-const reference to the element type of a given java array type
@@ -141,7 +141,7 @@ typet &java_array_element_type(symbol_typet &array_symbol)
141141
DATA_INVARIANT(
142142
is_java_array_tag(array_symbol.get_identifier()),
143143
"Symbol should have array tag");
144-
return array_symbol.add_type(ID_C_element_type);
144+
return array_symbol.add_type(ID_element_type);
145145
}
146146

147147
/// Checks whether the given type is an array pointer type
@@ -555,7 +555,7 @@ typet java_type_from_string(
555555
case '[': // array type
556556
{
557557
// If this is a reference array, we generate a plain array[reference]
558-
// with void* members, but note the real type in ID_C_element_type.
558+
// with void* members, but note the real type in ID_element_type.
559559
if(src.size()<=1)
560560
return nil_typet();
561561
char subtype_letter=src[1];
@@ -567,7 +567,7 @@ typet java_type_from_string(
567567
subtype_letter=='T') // Array of generic types
568568
subtype_letter='A';
569569
typet tmp=java_array_type(std::tolower(subtype_letter));
570-
tmp.subtype().set(ID_C_element_type, subtype);
570+
tmp.subtype().set(ID_element_type, subtype);
571571
return tmp;
572572
}
573573

0 commit comments

Comments
 (0)