aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2023-12-16 16:19:36 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2023-12-16 16:19:36 -0500
commit7abc7aae564e63173fbaa14805e3dddea7f6a160 (patch)
treedb2c2763f512ae22a920aecf8ff06c313d765fa5 /libphobos
parent30d9a3a69841b13ac01397cf879a043c39409572 (diff)
downloadgcc-7abc7aae564e63173fbaa14805e3dddea7f6a160.zip
gcc-7abc7aae564e63173fbaa14805e3dddea7f6a160.tar.gz
gcc-7abc7aae564e63173fbaa14805e3dddea7f6a160.tar.bz2
analyzer: add sarif properties for bounds checking diagnostics
As a followup to r14-6057-g12b67d1e13b3cf, add SARIF property bags for -Wanalyzer-out-of-bounds, to help with debugging these warnings. This was very helpful with PR analyzer/112792. gcc/analyzer/ChangeLog: * analyzer.cc: Include "tree-pretty-print.h" and "diagnostic-event-id.h". (tree_to_json): New. (diagnostic_event_id_to_json): New. (bit_offset_to_json): New. (byte_offset_to_json): New. * analyzer.h (tree_to_json): New decl. (diagnostic_event_id_to_json): New decl. (bit_offset_to_json): New decl. (byte_offset_to_json): New decl. * bounds-checking.cc: Include "diagnostic-format-sarif.h". (out_of_bounds::maybe_add_sarif_properties): New. (concrete_out_of_bounds::maybe_add_sarif_properties): New. (concrete_past_the_end::maybe_add_sarif_properties): New. (symbolic_past_the_end::maybe_add_sarif_properties): New. * region-model.cc (region_to_value_map::to_json): New. (region_model::to_json): New. * region-model.h (region_to_value_map::to_json): New decl. (region_model::to_json): New decl. * store.cc (bit_range::to_json): New. (byte_range::to_json): New. * store.h (bit_range::to_json): New decl. (byte_range::to_json): New decl. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions