Message ID | af19256469798ddf9b7906adacb8f8edfd574a25.1672867272.git.lhyatt@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=sOqqk95/; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Np1Z76RLbz23fc for <incoming@patchwork.ozlabs.org>; Fri, 6 Jan 2023 09:37:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D9B43385800A for <incoming@patchwork.ozlabs.org>; Thu, 5 Jan 2023 22:37:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9B43385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672958253; bh=dX2+xzTpqWtDJe91dl4pvitSpi3wqch6kv1wkVj4YOU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=sOqqk95/qyl0kqf3TGc1oZAeI8jPqP6bq2fBmn3sIdjYUNlEcTNXSrxTNzPhcdUA8 HY5wot6f8DLsrTEyNKQ+p1PVypp76Yc972zu2v5iivlo7iuahFmLy0BuPdWKnSCy8A 8d7+1lCGsYRbvtMqEmYm5fLX/N6A+aVsGEJwdKm4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by sourceware.org (Postfix) with ESMTPS id 4DB943858D33 for <gcc-patches@gcc.gnu.org>; Thu, 5 Jan 2023 22:36:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DB943858D33 Received: by mail-qv1-xf2f.google.com with SMTP id t7so1073333qvv.3 for <gcc-patches@gcc.gnu.org>; Thu, 05 Jan 2023 14:36:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dX2+xzTpqWtDJe91dl4pvitSpi3wqch6kv1wkVj4YOU=; b=LCEhV3lIoEB0lzaX7gk8tyNtiOVwKH5V0lqoXcGwW8SI9tjq2kfIu9rFyCxn8gfnya DLPwLPMorI+XtasWowzCCMkwK1gN8nvXMuNdwBtHFzoP1xUomjgfnyamcXYiYWQoxqNq 8t3vNIO8oq3UlaLlKhsn0dNMMUa4XxQ9yecluDpRJCeeuwtlgirucN1B+2VWE7OHaXC0 8+qok18iwAeIb2Bg7GHLN3hV2OGoNks9VT6TXB73vBsWephgMrJGVr4QJszEHYELqwCO 3Fw4TIBuAzwWwaVe9sfg8C583ZT3VO0b22d1v3YHfJ+PXwB4BfbuFRksGEWLN08G2NvF TRzA== X-Gm-Message-State: AFqh2kpfoazFxs7ZK+1GJ1FOjsRTSrzKjfvEESudm/oPaww1POClw94x Hy0izXa4JgTJ2i4KpQCvWLsDCCT+lWo= X-Google-Smtp-Source: AMrXdXsLScPblqRFBz4TK7e4pHaGpE0ZZgiowLeioGaqkH/DLe/8e4uV7oN924RrzmgP0IXY7IZ0mg== X-Received: by 2002:ad4:551d:0:b0:4d1:e110:1621 with SMTP id pz29-20020ad4551d000000b004d1e1101621mr70881837qvb.0.1672958194681; Thu, 05 Jan 2023 14:36:34 -0800 (PST) Received: from localhost.localdomain (96-67-140-173-static.hfc.comcastbusiness.net. [96.67.140.173]) by smtp.gmail.com with ESMTPSA id dm28-20020a05620a1d5c00b006e702033b15sm26289185qkb.66.2023.01.05.14.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 14:36:34 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: David Malcolm <dmalcolm@redhat.com>, Lewis Hyatt <lhyatt@gmail.com> Subject: [PATCH v2 2/4] diagnostics: Handle generated data locations in edit_context Date: Thu, 5 Jan 2023 17:36:06 -0500 Message-Id: <af19256469798ddf9b7906adacb8f8edfd574a25.1672867272.git.lhyatt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1672867272.git.lhyatt@gmail.com> References: <cover.1672867272.git.lhyatt@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3038.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 <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> From: Lewis Hyatt via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Lewis Hyatt <lhyatt@gmail.com> Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> |
Series |
diagnostics: libcpp: Overhaul locations for _Pragma tokens
|
expand
|
diff --git a/gcc/edit-context.cc b/gcc/edit-context.cc index 6f5bc6b9d8f..ae11b6f2e00 100644 --- a/gcc/edit-context.cc +++ b/gcc/edit-context.cc @@ -301,8 +301,12 @@ edit_context::apply_fixit (const fixit_hint *hint) return false; if (start.column == 0) return false; + if (start.generated_data) + return false; if (next_loc.column == 0) return false; + if (next_loc.generated_data) + return false; edited_file &file = get_or_insert_file (start.file); if (!m_valid)