bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36650: 27.0.50; CC Mode: Support C++ attributes


From: Óscar Fuentes
Subject: bug#36650: 27.0.50; CC Mode: Support C++ attributes
Date: Sun, 21 Jul 2019 00:21:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]