https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99771

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:0f9aa35c79a0fe195d5076375b5794246cf44819

commit r11-7917-g0f9aa35c79a0fe195d5076375b5794246cf44819
Author: David Malcolm <dmalc...@redhat.com>
Date:   Fri Mar 26 13:26:15 2021 -0400

    analyzer: only call get_diagnostic_tree when it's needed

    impl_sm_context::get_diagnostic_tree could be expensive, and
    I find myself needing to put a breakpoint on it to debug
    PR analyzer/99771, so only call it if we're about to use
    the result.

    gcc/analyzer/ChangeLog:
            * sm-file.cc (fileptr_state_machine::on_stmt): Only call
            get_diagnostic_tree if the result will be used.
            * sm-malloc.cc (malloc_state_machine::on_stmt): Likewise.
            (malloc_state_machine::on_deallocator_call): Likewise.
            (malloc_state_machine::on_realloc_call): Likewise.
            (malloc_state_machine::on_realloc_call): Likewise.
            * sm-sensitive.cc
            (sensitive_state_machine::warn_for_any_exposure): Likewise.
            * sm-taint.cc (taint_state_machine::on_stmt): Likewise.

Reply via email to