public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] analyzer: show program point in -Wanalyzer-too-complex
Date: Wed, 16 Sep 2020 19:08:20 -0400	[thread overview]
Message-ID: <20200916230820.29860-1-dmalcolm@redhat.com> (raw)

I found this useful when debugging.

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to master as 6dd96e24ea3cb9919fedd4da35fbfd36ed98b0ea.

gcc/analyzer/ChangeLog:
	* engine.cc (exploded_graph::get_or_create_node): Show the
	program point when issuing -Wanalyzer-too-complex due to hitting
	the per-program-point limit.
---
 gcc/analyzer/engine.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 49701b74fd4..8f5c5143ca5 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -1982,6 +1982,7 @@ exploded_graph::get_or_create_node (const program_point &point,
       > param_analyzer_max_enodes_per_program_point)
     {
       pretty_printer pp;
+      point.print (&pp, format (false));
       print_enode_indices (&pp, per_point_data->m_enodes);
       if (logger)
 	logger->log ("not creating enode; too many at program point: %s",
-- 
2.26.2


                 reply	other threads:[~2020-09-16 23:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916230820.29860-1-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).