From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Evan Klitzke Newsgroups: gmane.emacs.bugs Subject: bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++ Date: Thu, 7 Oct 2021 18:10:24 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ecea7905cdcd0b9c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26169"; mail-complaints-to="usenet@ciao.gmane.io" To: 51092@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 08 05:24:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYgUa-0006Zz-SG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Oct 2021 05:24:17 +0200 Original-Received: from localhost ([::1]:39240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYgUZ-0006W2-CR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 23:24:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYgUM-0006Vl-GY for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 23:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYgUM-0002m3-8V for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 23:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYgUM-0000Xq-0c for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 23:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Evan Klitzke Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Oct 2021 03:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16336633852021 (code B ref -1); Fri, 08 Oct 2021 03:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2021 03:23:05 +0000 Original-Received: from localhost ([127.0.0.1]:48852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYgTQ-0000WX-JU for submit@debbugs.gnu.org; Thu, 07 Oct 2021 23:23:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYePK-0005cE-O0 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 21:10:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYePI-00068X-Um for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 21:10:41 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:38715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYePG-0000YA-RR for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 21:10:40 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id x27so32393282lfu.5 for ; Thu, 07 Oct 2021 18:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eklitzke.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=BjTwEm8gcLgvhvzFc5tg8PN4F6U4nTQE1SumIc1Z/4w=; b=ehp1Vq92fU7J5Rr6iTONcRtG9RbRPUFqb4HYyUNjGokLTQYzewWy5nj5GxiHuXwO8B kg6/uKqYU+CaJGjqlWjCeeTiIcEtrtbXVxvqKG+WW38Hlv0/cUA4vn6u+4XN0BF0q4Ol MVpSOx3BDYTQf7gSeuROE2RbfPkto1MELQUNA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BjTwEm8gcLgvhvzFc5tg8PN4F6U4nTQE1SumIc1Z/4w=; b=pJb+joXWsp4GENQ/HABaCftSR6XQrMZSJIVPfKeF+CRQrqgHEhJ0CWk+j5wy5egsbO LyEy08LX0nDTDGMh/ZjuK88wom+xtr05bNQNVfzrCUL+riJpYULPlADJ4pcYJb33ga6o l9mSl6sn+y2je+z7E6nix1KaBIWw+TwEzUz1ZFVHpF5FwKFk0OlTUdxulaRsWcl68Lpv JTT55SuGe/QjxQc7r3+puwIzBeoqg5TIkV9r9B1eJawEfDOiBWQSvCJCR+s1pE1Jj027 WP+7n5qfOQabt9dsSV6wixaiTzfd1uQLY8r7aSFNAFrnX4kLrbJg6B8966eQZhj/2QYd sDbg== X-Gm-Message-State: AOAM531EyXMoxKtiXA44yz//yIYLxuS7IilS5uZlyIhw34k5+dsZX/iR Ecftv48QDi8b+F/Szw9PTs+kaYrv/7bs16UPsU4ZjICOfvk= X-Google-Smtp-Source: ABdhPJw6qAzGPM5qbp6Sgvf8q+cpseCAY1JTg0ylnfq15gyIJpUCRSUmybOa7eTJ7zmke5N204Oq0RzyGXs+MsZTYU0= X-Received: by 2002:ac2:5229:: with SMTP id i9mr7428380lfl.493.1633655435601; Thu, 07 Oct 2021 18:10:35 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=evan@eklitzke.org; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 07 Oct 2021 23:23:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216693 Archived-At: --000000000000ecea7905cdcd0b9c Content-Type: text/plain; charset="UTF-8" These two modifiers were introduced by C++20. The change is trivial but I tested it locally on some code I have that uses these modifiers and with this change the keywords are recognized as expected. I agree to copyright assignment to the FSF, etc. Patch against master is attached; I think this should be backported to the emacs-28 branch as well. -- evan klitzke https://eklitzke.org/ --000000000000ecea7905cdcd0b9c Content-Type: text/x-patch; charset="US-ASCII"; name="consteval.patch" Content-Disposition: attachment; filename="consteval.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kuho8b7l0 Y29tbWl0IDk2OGJjMDFhZWUzNDFkNzY3NDg0ODA3MDE3NjRiMmZiYTA2ODkxMTIgKEhFQUQgLT4g Y29uc3RldmFsLCBldmFuL2NvbnN0ZXZhbCkKQXV0aG9yOiBFdmFuIEtsaXR6a2UgPGV2YW5AZWts aXR6a2Uub3JnPgpEYX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