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

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

bug#14626: CC Mode 5.32.5 (C++/l); indentation problem involving overrid


From: Michael Welsh Duggan
Subject: bug#14626: CC Mode 5.32.5 (C++/l); indentation problem involving override
Date: Sun, 16 Jun 2013 00:48:10 -0400
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Michael Welsh Duggan <mwd@md5i.com> writes:

> Date: Sat, 15 Jun 2013 12:03:45 -0400
> Message-ID: <87a9mrqs2m.fsf@maru.md5i.com>
> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
>
> In c++-mode, the following class gets indented correctly:
>
> class Foo
> {
>   Foo
>   foo()
>     const;
> };
>
> as does this:
>
> class Foo
> {
>   Foo *
>   foo()
>     const;
> };
>
> and this:
>
> class Foo
> {
>   Foo
>   foo()
>     const
>     override;
> };
>
>
> But the following does not:
>
> class Foo
> {
>   Foo *
>   foo()
>   const
>   override;
> };

It looks to me that "noexcept", "override", and "final" may need to be
added to c-type-modifier-kwds.  Or maybe more appropriately in
c-type-decl-suffix-key, since they can only appear at the end of a
declaration.  A brief scan through cc-langs.el shows that there might
need to be a few other new c++11 symbols added as well, such as
"constexpr".   "decltype" might be particularly troublesome, as it is a
type that includes an argument in parentheses.

Please note that "noexcept", like "throw", can have a parenthetical
expression after it.

-- 
Michael Welsh Duggan
(md5i@md5i.com)





reply via email to

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