Skip to content

Commit 9d94bf7

Browse files
Make annotations comments in irep_idt
This avoids failing type comparison when one contains annotations and not the other.
1 parent c6cbf7c commit 9d94bf7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/java_bytecode/java_types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ class annotated_typet : public typet
7171
{
7272
// This cast should be safe as java_annotationt doesn't add data to irept
7373
return reinterpret_cast<const std::vector<java_annotationt> &>(
74-
find(ID_annotations).get_sub());
74+
find(ID_C_annotations).get_sub());
7575
}
7676

7777
std::vector<java_annotationt> &get_annotations()
7878
{
7979
// This cast should be safe as java_annotationt doesn't add data to irept
8080
return reinterpret_cast<std::vector<java_annotationt> &>(
81-
add(ID_annotations).get_sub());
81+
add(ID_C_annotations).get_sub());
8282
}
8383
};
8484

src/util/irep_ids.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ IREP_ID_TWO(overflow_shl, overflow-shl)
664664
IREP_ID_TWO(C_no_initialization_required, #no_initialization_required)
665665
IREP_ID_TWO(overlay_class, java::com.diffblue.OverlayClassImplementation)
666666
IREP_ID_TWO(overlay_method, java::com.diffblue.OverlayMethodImplementation)
667-
IREP_ID_ONE(annotations)
667+
IREP_ID_TWO(C_annotations, #annotations)
668668

669669
// Projects depending on this code base that wish to extend the list of
670670
// available ids should provide a file local_irep_ids.h in their source tree and

0 commit comments

Comments
 (0)