GNU bug report logs - #72695
CC Mode 5.35.2 (C++//l); c++-mode misindents 'if constexpr' inside lambdas

Previous Next

Package: cc-mode;

Reported by: Arsen Arsenović <arsen <at> aarsen.me>

Date: Sun, 18 Aug 2024 09:52:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Alan Mackenzie <acm <at> muc.de>
To: Arsen Arsenović <arsen <at> aarsen.me>
Cc: acm <at> muc.de, 72695 <at> debbugs.gnu.org
Subject: Re: bug#72695: CC Mode 5.35.2 (C++//l); c++-mode misindents 'if
 constexpr' inside lambdas
Date: Fri, 27 Sep 2024 14:13:14 +0000
Hello, Arsen.

On Thu, Sep 26, 2024 at 22:14:28 +0200, Arsen Arsenović wrote:
> Hi Alan,

[ .... ]

> > ..... My reading of that lambda-expression derivation is that the
> > "alignas (128)" is the atribute-specifier-seq_opt, and the "requires
> > some_concept<T>" is the requires-clause_opt.  Surely the first of
> > these, the "alignas" needs to come after the second, the "requires"?

> > Phew!

> Yes!  You're completely right, I accidentally "combined" the two cases
> of lambda-expression while writing that example.  Forgive me.

> (serves me right for bug-reporting late.. ;-) )

I'm glad we agree on this point.  :-)

[ .... ]

> > I'm hoping to get the patch committed before the weekend.

> Yay!  :-)

I've now committed a slightly different patch, after noticing and fixing
another bug.

The bug was that in code like

1 template <typename T>
2 requires requires (T x)
3 { x + x; }
4 T add(T a, T b)
5 {
6    return a + b;
7 }

, L4, a topmost-intro-cont used to be anchored on the previous
topmost-intro-cont line, L2, whereas it should be anchored on the
topmost-intro, L1.

I've now corrected this.

I didn't send you yet another patch with request for testing, because
I've done that rather a lot of late, and I'm confident about the patch.

I haven't yet closed the bug, just in case you wanted to do some final,
final testing on the committed version.  Please let me know what you feel
about that, so that I can finally close this bug.

Just as a matter of interest, one or two other bugs reared their heads,
but I'm fixing these separately in the next few days.

> Thank you very much!

Thank you again.

> Have a lovely night.
> -- 
> Arsen Arsenović

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 294 days ago.

Previous Next


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