From: David Malcolm Date: Fri, 7 Nov 2025 21:21:06 +0000 (-0500) Subject: analyzer: fix stray trailing "allocated here" text in events X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcef30b559d469ee36bce593027ca21aa30007eb;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/analyzer/checker-event.cc b/gcc/analyzer/checker-event.cc index 3e54c2a408c..57e36d470e8 100644 --- a/gcc/analyzer/checker-event.cc +++ b/gcc/analyzer/checker-event.cc @@ -361,7 +361,8 @@ region_creation_event_allocation_size::print_desc (pretty_printer &pp) const "allocated %qE bytes here", m_capacity); } - pp_printf (&pp, "allocated here"); + else + pp_printf (&pp, "allocated here"); } void