aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-11-11 21:18:59 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2020-11-11 21:18:59 -0500
commit8069928d5c2a99973ac16a49d6c25bc4dc886e14 (patch)
tree1bab14e9c9b31791da7c742d6fbc166616c03147 /gcc/dwarf2out.c
parent5e00ad3ffbfb4df7242c313a0d836f5b538eb2fb (diff)
downloadgcc-8069928d5c2a99973ac16a49d6c25bc4dc886e14.zip
gcc-8069928d5c2a99973ac16a49d6c25bc4dc886e14.tar.gz
gcc-8069928d5c2a99973ac16a49d6c25bc4dc886e14.tar.bz2
analyzer: precision-of-wording for -Wanalyzer-stale-setjmp-buffer
This patch adds a custom event to paths emitted by -Wanalyzer-stale-setjmp-buffer highlighting the place where the pertinent stack frame is popped, and updates the final event in the path to reference this. gcc/analyzer/ChangeLog: * checker-path.h (checker_event::get_id_ptr): New. * diagnostic-manager.cc (path_builder::path_builder): Add "sd" param and use it to initialize new field "m_sd". (path_builder::get_pending_diagnostic): New. (path_builder::m_sd): New field. (diagnostic_manager::emit_saved_diagnostic): Pass sd to path_builder ctor. (diagnostic_manager::add_events_for_superedge): Call new maybe_add_custom_events_for_superedge vfunc. * engine.cc (stale_jmp_buf::stale_jmp_buf): Add "setjmp_point" param and use it to initialize new field "m_setjmp_point". Initialize new field "m_stack_pop_event". (stale_jmp_buf::maybe_add_custom_events_for_superedge): New vfunc implementation. (stale_jmp_buf::describe_final_event): New vfunc implementation. (stale_jmp_buf::m_setjmp_point): New field. (stale_jmp_buf::m_stack_pop_event): New field. (exploded_node::on_longjmp): Pass setjmp_point to stale_jmp_buf ctor. * pending-diagnostic.h (pending_diagnostic::maybe_add_custom_events_for_superedge): New vfunc. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/setjmp-5.c: Update expected path output to show an event where the pertinent stack frame is popped. Update expected message from final event to reference this event.
Diffstat (limited to 'gcc/dwarf2out.c')
0 files changed, 0 insertions, 0 deletions