From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas Date: Mon, 30 Sep 2019 18:40:59 +0200 Message-ID: References: <87ehhyzfht.fsf@dezj.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="192963"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Alan Mackenzie , 13367-done@debbugs.gnu.org To: Denis Zalevskiy Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 18:42:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEykU-000o5M-QW for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 18:42:10 +0200 Original-Received: from localhost ([::1]:55020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEykT-0000k4-O7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 12:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43379) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEykN-0000jb-Ba for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 12:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEykM-000880-CR for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 12:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEykM-00087t-95; Mon, 30 Sep 2019 12:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEykM-0001mX-6F; Mon, 30 Sep 2019 12:42:02 -0400 In-Reply-To: <87ehhyzfht.fsf@dezj.lan> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 30 Sep 2019 16:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 13367 X-GNU-PR-Package: emacs,cc-mode Mail-Followup-To: 13367@debbugs.gnu.org, stefan@marxist.se, denis.zalevskiy@jollamobile.com Original-Received: via spool by 13367-done@debbugs.gnu.org id=D13367.15698616796769 (code D ref 13367); Mon, 30 Sep 2019 16:42:01 +0000 Original-Received: (at 13367-done) by debbugs.gnu.org; 30 Sep 2019 16:41:19 +0000 Original-Received: from localhost ([127.0.0.1]:60365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEyjf-0001l7-0i for submit@debbugs.gnu.org; Mon, 30 Sep 2019 12:41:19 -0400 Original-Received: from mail-pf1-f178.google.com ([209.85.210.178]:40066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEyjc-0001kj-4F for 13367-done@debbugs.gnu.org; Mon, 30 Sep 2019 12:41:17 -0400 Original-Received: by mail-pf1-f178.google.com with SMTP id x127so5922025pfb.7 for <13367-done@debbugs.gnu.org>; Mon, 30 Sep 2019 09:41:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Z8Uo4i6LinoOY0qONCgCi9PBT5ErxUDoPrQKv3QLtjQ=; b=WZP0a+c9e0rW/WE1P0HtOnlYK+rIHhiBjrUz44lztu0+qK1wzm+/C/7C+9bh3EMBbH x0ZH8JR9ScLdVkfy7ZvPTx+3gqhEB/9LBEMklh+C6jgtwiiI0hJG/Q8zjNWAEZ8NbwCM QDF0iKRCarIWGMKOplZd/ul3YK4qzeDzflGoC8evywxIrgLa4kX40jM2MsXbJlx72tia BEE1oVt1rKd3VWVfhSk4/g9pPHH8KIhvj4jmaC6WYnINv2O2eyCosgYUCE/TzIZ9kgvX 1uUiocEALcROYqZrLuwBZTWieMj48wo9wGeexcgLmfpDKJw/pZvuyvktn1QGN+iF+Wl0 nw+Q== X-Gm-Message-State: APjAAAWl2xrtuIxMTBXaxkQSmNbzhDUlc3Ul7o20DuRe1aocyZNzBEnC xowb6uW9ED8nz3WOk9+MjhMGwhJ/tZp69UrmOl4= X-Google-Smtp-Source: APXvYqyB64ccc9nEMIHKGwfJHezxZtw3OoZSuhGFf+DLerVMrn51nDrtPkge7/4RLcxElz5MdjfZSlYDniT0TYKzKOo= X-Received: by 2002:a62:e917:: with SMTP id j23mr22494484pfh.50.1569861670081; Mon, 30 Sep 2019 09:41:10 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167927 Archived-At: Denis Zalevskiy writes: > Just create c++ file and enter: > > #include > #include > > int main() > { > std::vector 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