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
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-5090-gfcef30b559d469.
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.
---
gcc/analyzer/checker-event.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/analyzer/checker-event.cc b/gcc/analyzer/checker-event.cc
index 3e54c2a408c0..57e36d470e80 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
--
2.26.3