GNU bug report logs - #36650
27.0.50; CC Mode: Support C++ attributes

Previous Next

Packages: emacs, cc-mode;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Sun, 14 Jul 2019 14:50:02 UTC

Severity: normal

Found in version 27.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 36650 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 36650 <at> debbugs.gnu.org
Subject: Re: bug#36650: 27.0.50; CC Mode: Support C++ attributes
Date: Sun, 21 Jul 2019 00:21:43 +0200
Alan Mackenzie <acm <at> 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).




This bug report was last modified 6 years and 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.