]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: fix stray trailing "allocated here" text in events
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 7 Nov 2025 21:21:06 +0000 (16:21 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 7 Nov 2025 21:21:06 +0000 (16:21 -0500)
commitfcef30b559d469ee36bce593027ca21aa30007eb
tree29a9a267bfa19afa6b2e2cd38762e6584df31f19
parentc66ebc3e22138dc505b18865f5337b05a61012ad
analyzer: fix stray trailing "allocated here" text in events

Fix event text like this (seen in gcc.dg/analyzer/allocation-size-5.c):

   31 |   char arr[sizeof (int16_t)];
      |        ^~~
      |        |
      |        (1) allocated 2 bytes hereallocated here

gcc/analyzer/ChangeLog:
* checker-event.cc
(region_creation_event_allocation_size::print_desc): Fix missing
"else" leading to stray trailing "allocated here" text in events.

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