unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>
Cc: Alan Mackenzie <acm@muc.de>, 13367-done@debbugs.gnu.org
Subject: bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas
Date: Mon, 30 Sep 2019 18:40:59 +0200	[thread overview]
Message-ID: <CADwFkm=zFn=5=mBcFPh3hZkpJYsnXoCf4kSYN2ZdsqPKY7WAEA@mail.gmail.com> (raw)
In-Reply-To: <87ehhyzfht.fsf@dezj.lan>

Denis Zalevskiy <denis.zalevskiy@jollamobile.com> writes:

> Just create c++ file and enter:
>
> #include <vector>
> #include <algorithm>
>
> int main()
> {
>     std::vector<int> v;
>     std::for_each(v.begin(), v.end(),
>                   [](int i) {
>                       switch (i) {
>                       case 1:
>                           break; // (1) ok: syntactic symbol is statement-case-intro
>                       }
>                   });
>     auto fn = [](int i) {
>         switch (i) {
>         case 1:
>         break;  // (2) wrong: syntactic symbol is brace-list-entry
>         }
>     };
>
>     [](int i) {
>         switch (i) {
>         case 1:
>             break; // (3) ok: syntactic symbol is statement-case-intro
>         }
>     };
>     return 0;
> }
>
> So, while (1) and (3) are parsed fine, (2) is parsed in a wrong way.

I can't reproduce this on current master, so I'm going to assume that
this has been fixed in the 6 years since this was reported and close
this bug.

If this is still an issue, please reopen the bug report.

Best regards,
Stefan Kangas





  reply	other threads:[~2019-09-30 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 12:02 bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas Denis Zalevskiy
2019-09-30 16:40 ` Stefan Kangas [this message]
2019-09-30 18:59   ` Alan Mackenzie
2019-09-30 20:27     ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=zFn=5=mBcFPh3hZkpJYsnXoCf4kSYN2ZdsqPKY7WAEA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=13367-done@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=denis.zalevskiy@jollamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).