Message ID | 20240618150819.946820-1-dmalcolm@redhat.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B8FE388459F for <patchwork@sourceware.org>; Tue, 18 Jun 2024 15:09:16 +0000 (GMT) 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.133.124]) by sourceware.org (Postfix) with ESMTPS id E05673882AEC for <gcc-patches@gcc.gnu.org>; Tue, 18 Jun 2024 15:08:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E05673882AEC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E05673882AEC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718723307; cv=none; b=f4ipzEqB08BwKAbsl2UpFoanjma/iJXo9LUQViSeZfriOK1B3HKs7Foc+xFXVqU81KGFAgSqec2ZwESoIRTn7gOcpRKXuvbetUcVffLGc/sAif+u8H9XTTRlB4uwnfP8aUxJNhuxiPVcGv9Zahg4rdwFqPDLvB1FDS8EBQk0sus= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718723307; c=relaxed/simple; bh=eHdZ6X7SvzwLZIx/37yCtWRfmW864Zq71ZJ4nxNDOkU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=cwsHzoNRrvaGk2TrRHVu2PlpKWLF1vDv/HKOyfDeNLm/2i6QROI1kt57I1yrVe+zmuhIw8fa+TqkUYc4Z/2A1OXl27HjLyPxumsdqoOAoZ+Zt/gV7iPkCEBcoEiSdGJxQeXKB1OY4bIQUQdt6apPS3m/26AhNFkF1vi6p5WvenU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718723305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j/YB5XXWwsLtpK90f0W/7WLFzDjv+C0kPYE3LWzDe+M=; b=SexlACoYMFkhkNBHHz+VcYtip/zC1nFBwza+X/kuYqCluuj+o5CeN4AlDmxrCFZjvsDm1R UJ4nl7r9MYT6K5KqJi/Ant44edHP9ZtuY/Hmz6t7HyTiB4DKcu304rF3Z4yrgYQR8zlEmh xGORiQE1m37DtceHb3X71nMVWsM/8Bs= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-HxWHo12UPfyBhuzVb86w1g-1; Tue, 18 Jun 2024 11:08:23 -0400 X-MC-Unique: HxWHo12UPfyBhuzVb86w1g-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3DBA21955D87 for <gcc-patches@gcc.gnu.org>; Tue, 18 Jun 2024 15:08:22 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.10.107]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7C69E1956052; Tue, 18 Jun 2024 15:08:21 +0000 (UTC) From: David Malcolm <dmalcolm@redhat.com> To: gcc-patches@gcc.gnu.org Cc: David Malcolm <dmalcolm@redhat.com> Subject: [pushed 0/7] diagnostics: remove "tree" dependency from diagnostic paths Date: Tue, 18 Jun 2024 11:08:12 -0400 Message-Id: <20240618150819.946820-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-3.0 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_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org |
Series |
diagnostics: remove "tree" dependency from diagnostic paths
|
|
Message
David Malcolm
June 18, 2024, 3:08 p.m. UTC
This patch kit removes the dependency on "tree" from diagnostic paths, renaming tree-diagnostic-path.cc to diagnostic-path.cc. I have an updated prototype of libdiagnostics that uses this to support execution paths. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Successful run of analyzer integration tests on x86_64-pc-linux-gnu. Pushed to trunk as r15-1410-gf89f9c7ae7190c through r15-1416-g524cdf4dab610e. David Malcolm (7): diagnostics: move simple_diagnostic_{path,thread,event} to their own .h/cc diagnostics: eliminate "tree" from diagnostic_{event,path} diagnostics: remove tree usage from tree-diagnostic-path.cc diagnostics: eliminate diagnostic_context::m_make_json_for_path diagnostics: introduce diagnostic-macro-unwinding.h/cc diagnostics: eliminate diagnostic_context::m_print_path callback diagnostics: rename tree-diagnostic-path.cc to diagnostic-path.cc gcc/Makefile.in | 6 +- gcc/analyzer/checker-event.h | 2 +- gcc/analyzer/checker-path.cc | 8 + gcc/analyzer/checker-path.h | 5 + gcc/c-family/c-opts.cc | 2 +- gcc/diagnostic-format-json.cc | 41 ++- gcc/diagnostic-format-sarif.cc | 4 +- gcc/diagnostic-macro-unwinding.cc | 221 ++++++++++++ gcc/diagnostic-macro-unwinding.h | 29 ++ ...-diagnostic-path.cc => diagnostic-path.cc} | 317 ++++++------------ gcc/diagnostic-path.h | 114 +------ gcc/diagnostic.cc | 199 +++-------- gcc/diagnostic.h | 6 +- gcc/logical-location.h | 10 +- gcc/selftest-diagnostic-path.cc | 233 +++++++++++++ gcc/selftest-diagnostic-path.h | 163 +++++++++ gcc/selftest-logical-location.cc | 71 ++++ gcc/selftest-logical-location.h | 58 ++++ gcc/selftest-run-tests.cc | 3 +- gcc/selftest.h | 3 +- gcc/simple-diagnostic-path.cc | 237 +++++++++++++ gcc/simple-diagnostic-path.h | 139 ++++++++ .../plugin/diagnostic_plugin_test_paths.c | 1 + gcc/tree-diagnostic.cc | 197 ----------- gcc/tree-diagnostic.h | 10 - gcc/tree-logical-location.cc | 25 ++ gcc/tree-logical-location.h | 3 + 27 files changed, 1410 insertions(+), 697 deletions(-) create mode 100644 gcc/diagnostic-macro-unwinding.cc create mode 100644 gcc/diagnostic-macro-unwinding.h rename gcc/{tree-diagnostic-path.cc => diagnostic-path.cc} (89%) create mode 100644 gcc/selftest-diagnostic-path.cc create mode 100644 gcc/selftest-diagnostic-path.h create mode 100644 gcc/selftest-logical-location.cc create mode 100644 gcc/selftest-logical-location.h create mode 100644 gcc/simple-diagnostic-path.cc create mode 100644 gcc/simple-diagnostic-path.h