]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: add SARIF property bag to -Wanalyzer-allocation-size
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 30 Jan 2024 13:17:47 +0000 (08:17 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 30 Jan 2024 13:17:47 +0000 (08:17 -0500)
commit181f753dc4afa9866d6125904cf050d5eb437a86
treec00924a27ed96760a686c56ab808f811ffed72e3
parent2a9881565c7b48d04cf891666a66a1a2e560bce8
analyzer: add SARIF property bag to -Wanalyzer-allocation-size

This is useful for debugging the analyzer.

gcc/analyzer/ChangeLog:
* region-model.cc
(dubious_allocation_size::dubious_allocation_size): Add
"capacity_sval" param.  Drop unused ctor.
(dubious_allocation_size::maybe_add_sarif_properties): New.
(dubious_allocation_size::m_capacity_sval): New field.
(region_model::check_region_size): Pass capacity svalue to
dubious_allocation_size ctor.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/region-model.cc