From patchwork Thu Nov 3 17:51:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp678740wru; Thu, 3 Nov 2022 10:53:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jCtdrfLzbfI8IiwYKzaVnxXLXc9Kx1Ut43oFV4WJHDZi+aQcpsh7rfCTZBqPNMsfzraWu X-Received: by 2002:a17:906:3b48:b0:7ad:fa67:1daa with SMTP id h8-20020a1709063b4800b007adfa671daamr11630674ejf.653.1667497985805; Thu, 03 Nov 2022 10:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667497985; cv=none; d=google.com; s=arc-20160816; b=eb4xIg4wy9H/OhHwJ41DYxRtIo6VQjclaDn/o9/rl+AEQ/e7XZGZH2N0LKkltXmCge yI9w47EFoKmGqBfXPJhzn455KdDaMU2MtUjqPNZWL0J4fxYm0icbpBzPTLztggUoc32O tp6+V+FU9VXY3Wl4nqT7o/z6rF3cah1zWhvz1SB54p7s8pbugXOsgTWDojsgvvliy9yk YqAENWk8d0CAqCnkFFEYDm0zUo3OMK8M2wIyz3x7yqLFG77/Z1I+VrBLA6TcV1T+UF+F M4jgC4+VOfjSAjWRu25ihw1goLYo12KWt7cDsnwPfSuqUMK1PgglK8SXtgiamSonzsBy uHQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=99+hDvjYwK6UWcX2a9ORVzKkzNqPYX1r2qxv3e82h8Y=; b=cELTOH/nndZD++Wghc/b/vnR2N4Omy8AXs9+Ik1bfX5vs38QDco5JIjpvEcyr92N87 cpnq6RBDehNtRVqgOBwi0TU+BTkIsjMPL5QjGQn5KDh3xndYJJzVX0UKxGIn0CZq4yhT wyAUE6/J+AY1qumXui9KMf+HRl/SOq3q1ukYD3E/KLeo17oNdzCLCrIrfP/fFw7xhK02 E6dOVZG364EjtOEHK0wzdNm7z/7GdsmU7rPbLA8sWdn3dWweeehzE4sAnk1F7UdptUVG +bOfDIxun/cuU4HYIAx0AeaTc6mS6oBhlZ1FOcM1M/hNP4VRIuLvxtHJ+5FDodFExDmc 7gKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=kK5u1XMe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r18-20020a50c012000000b004637e16cf97si1710723edb.597.2022.11.03.10.53.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:53:05 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=kK5u1XMe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C14638576B6 for ; Thu, 3 Nov 2022 17:52:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C14638576B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667497951; bh=99+hDvjYwK6UWcX2a9ORVzKkzNqPYX1r2qxv3e82h8Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=kK5u1XMeLSI6/4HUXHso5YaaIezfCl/jD/4QDMyUgYIqB4ucDP3oFOKfmsk1R+hh2 H9hRcjd+6CGqAf0ziltwFQfW7ESmIGo1xmrbVhavpwEarNWdvhILx7WZ3BxbEDmSEY feInza51hXWvZ88g19oUQNQYLfNrEOU35eOM+Vlc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 20D563858D35 for ; Thu, 3 Nov 2022 17:51:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 20D563858D35 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-539-Mgp0sVwYOky22EcGU1csjQ-1; Thu, 03 Nov 2022 13:51:38 -0400 X-MC-Unique: Mgp0sVwYOky22EcGU1csjQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C316811E7A for ; Thu, 3 Nov 2022 17:51:38 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 269ED2166B26; Thu, 3 Nov 2022 17:51:38 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [committed 0/8] Use std::unique_ptr in analyzer Date: Thu, 3 Nov 2022 13:51:27 -0400 Message-Id: <20221103175135.2269543-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748498368114772412?= X-GMAIL-MSGID: =?utf-8?q?1748498368114772412?= Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3629-g6341f14e369a5c through r13-3636-ge177be86c7d327. David Malcolm (8): analyzer: use std::unique_ptr for pending_diagnostic/note analyzer: use std::unique_ptr for saved_diagnostic::m_stmt_finder analyzer: use std::unique_ptr for custom_edge_info pointers analyzer: use std::unique_ptr for feasibility_problems and exploded_path analyzer: use std::unique_ptr for checker_event analyzer: use std::unique_ptr during bifurcation analyzer: use std::unique_ptr for known functions analyzer: use std::unique_ptr for state machines from plugins gcc/analyzer/analysis-plan.cc | 1 + gcc/analyzer/analyzer-pass.cc | 1 + gcc/analyzer/analyzer-selftests.cc | 1 + gcc/analyzer/analyzer.cc | 1 + gcc/analyzer/analyzer.h | 9 +- gcc/analyzer/call-info.cc | 10 +- gcc/analyzer/call-string.cc | 1 + gcc/analyzer/call-summary.cc | 1 + gcc/analyzer/checker-path.cc | 28 +- gcc/analyzer/checker-path.h | 4 +- gcc/analyzer/complexity.cc | 1 + gcc/analyzer/constraint-manager.cc | 1 + gcc/analyzer/diagnostic-manager.cc | 257 +++++++++--------- gcc/analyzer/diagnostic-manager.h | 29 +- gcc/analyzer/engine.cc | 176 ++++++------ gcc/analyzer/exploded-graph.h | 21 +- gcc/analyzer/feasible-graph.cc | 5 +- gcc/analyzer/feasible-graph.h | 2 +- gcc/analyzer/known-function-manager.cc | 6 +- gcc/analyzer/known-function-manager.h | 2 +- gcc/analyzer/pending-diagnostic.cc | 14 +- gcc/analyzer/pending-diagnostic.h | 1 + gcc/analyzer/program-point.cc | 1 + gcc/analyzer/program-state.cc | 1 + gcc/analyzer/region-model-asm.cc | 1 + gcc/analyzer/region-model-impl-calls.cc | 16 +- gcc/analyzer/region-model-manager.cc | 1 + gcc/analyzer/region-model-reachability.cc | 1 + gcc/analyzer/region-model.cc | 90 +++--- gcc/analyzer/region-model.h | 42 +-- gcc/analyzer/region.cc | 1 + gcc/analyzer/sm-fd.cc | 58 ++-- gcc/analyzer/sm-file.cc | 10 +- gcc/analyzer/sm-malloc.cc | 53 ++-- gcc/analyzer/sm-pattern-test.cc | 6 +- gcc/analyzer/sm-sensitive.cc | 5 +- gcc/analyzer/sm-signal.cc | 10 +- gcc/analyzer/sm-taint.cc | 22 +- gcc/analyzer/sm.cc | 10 + gcc/analyzer/sm.h | 12 +- gcc/analyzer/state-purge.cc | 1 + gcc/analyzer/store.cc | 1 + gcc/analyzer/supergraph.cc | 1 + gcc/analyzer/svalue.cc | 1 + gcc/analyzer/trimmed-graph.cc | 1 + gcc/analyzer/varargs.cc | 38 +-- .../gcc.dg/plugin/analyzer_gil_plugin.c | 15 +- .../gcc.dg/plugin/analyzer_kernel_plugin.c | 11 +- .../gcc.dg/plugin/analyzer_known_fns_plugin.c | 11 +- 49 files changed, 534 insertions(+), 458 deletions(-)