From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: =?UTF-8?Q?=C3=93scar?= Fuentes <ofv@wanadoo.es>
Newsgroups: gmane.emacs.bugs
Subject: bug#36650: 27.0.50; CC Mode: Support C++ attributes
Date: Sun, 21 Jul 2019 00:21:43 +0200
Message-ID: <87d0i48hzc.fsf@telefonica.net>
References: <20190715142718.71903.qmail@mail.muc.de>
 <87muhf9vjs.fsf@telefonica.net> <20190720180230.GB27030@ACM>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="175736"; mail-complaints-to="usenet@blaine.gmane.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Cc: 36650@debbugs.gnu.org
To: Alan Mackenzie <acm@muc.de>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 21 00:22:09 2019
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1hoxk1-000jZ2-DV
	for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 00:22:09 +0200
Original-Received: from localhost ([::1]:53786 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.86_2)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1hoxjz-0004rT-O7
	for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2019 18:22:07 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45863)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1hoxjx-0004rN-G7
 for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:22:06 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1hoxjw-0002OU-JN
 for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:22:05 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:49148)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1hoxju-0002MS-46; Sat, 20 Jul 2019 18:22:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1hoxjt-0007A1-Uz; Sat, 20 Jul 2019 18:22:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes <ofv@wanadoo.es>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org
Resent-Date: Sat, 20 Jul 2019 22:22:01 +0000
Resent-Message-ID: <handler.36650.B36650.156366131527511@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 36650
X-GNU-PR-Package: emacs,cc-mode
Original-Received: via spool by 36650-submit@debbugs.gnu.org id=B36650.156366131527511
 (code B ref 36650); Sat, 20 Jul 2019 22:22:01 +0000
Original-Received: (at 36650) by debbugs.gnu.org; 20 Jul 2019 22:21:55 +0000
Original-Received: from localhost ([127.0.0.1]:57969 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1hoxjm-00079f-PG
 for submit@debbugs.gnu.org; Sat, 20 Jul 2019 18:21:54 -0400
Original-Received: from relayout03-redir.e.movistar.es ([86.109.101.203]:26259)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ofv@wanadoo.es>) id 1hoxjk-00079P-MW
 for 36650@debbugs.gnu.org; Sat, 20 Jul 2019 18:21:53 -0400
Original-Received: from sky (162.red-79-151-6.dynamicip.rima-tde.net [79.151.6.162])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: 981711563@telefonica.net)
 by relayout03.e.movistar.es (Postfix) with ESMTPSA id 45rj5h0Jl7zMlMq;
 Sun, 21 Jul 2019 00:21:43 +0200 (CEST)
In-Reply-To: <20190720180230.GB27030@ACM> (Alan Mackenzie's message of "Sat,
 20 Jul 2019 18:02:30 +0000")
X-CTCH-Score: 0.000
X-CTCH-ScoreCust: 0.000
X-TnetOut-Country: IP: 79.151.6.162 | Country: ES
X-TnetOut-Information: AntiSPAM and AntiVIRUS on relayout03
X-TnetOut-MsgID: 45rj5h0Jl7zMlMq.A82BE
X-TnetOut-SpamCheck: no es spam, Unknown
X-TnetOut-From: ofv@wanadoo.es
X-TnetOut-Watermark: 1564266104.43689@5Mv8JYHPHSYZFEC138PPkA
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 209.51.188.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:163493
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/163493>

Alan Mackenzie <acm@muc.de> writes:

> The patch below (which should apply cleanly to the master branch) is a
> first attempt at handling C++ attributes.

Thank you Alan. Wow, it required more changes than I would expect.

Seems that it mostly works. The only issue I've found so far is

struct S {
  S[[using : const]]()
  : data(0)
  {}
  int data;
};

Note how ": data(0)" is not indented. If the attribute is moved before the
name:

struct S {
  [[using : const]] S()
    : data(0)
  {}
  int data;
};

or after the parameter list:

struct S {
  S() [[using: const]]
    : data(0)
  {}
  int data;
};


then the indentation is correct. This only happens if the attribute is
of the form "using:" (it is irrelevant if there is space between "using"
and the colon).