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

From: Óscar Fuentes <[email-masked]>
Date: Sun, 21 Jul 2019 00:21:43 +0200

Alan Mackenzie <[email-masked]> 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).