[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 16 00:25:12 PDT 2021
MyDeveloperDay added a comment.
For this case:
> return iter::chain.from_iterable(
> [](auto&& ite) -> auto&
> {
> return ite.second;
> });
The code has not been classified as a Lambda
AnnotatedTokens(L=0):
M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=return L=6 PPK=2 FakeLParens= FakeRParens=0 II=0x24bf7e8 Text='return'
M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=23 Name=identifier L=11 PPK=2 FakeLParens=0/ FakeRParens=0 II=0x24c35c0 Text='iter'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=23 Name=coloncolon L=13 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='::'
M=0 C=1 T=Unknown S=0 F=0 B=0 BK=0 P=520 Name=identifier L=18 PPK=2 FakeLParens= FakeRParens=0 II=0x24c3738 Text='chain'
M=0 C=1 T=Unknown S=0 F=0 B=0 BK=0 P=170 Name=period L=19 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='.'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=23 Name=identifier L=32 PPK=2 FakeLParens= FakeRParens=0 II=0x24c3760 Text='from_iterable'
M=0 C=0 T=Unknown S=0 F=0 B=1 BK=0 P=23 Name=l_paren L=33 PPK=1 FakeLParens= FakeRParens=0 II=0x0 Text='('
M=0 C=1 T=ArrayInitializerLSquare S=0 F=0 B=0 BK=0 P=59 Name=l_square L=34 PPK=2 FakeLParens=1/ FakeRParens=0 II=0x0 Text='['
M=0 C=1 T=Unknown S=0 F=0 B=0 BK=0 P=79 Name=r_square L=35 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=']'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=43 Name=l_paren L=36 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='('
M=0 C=1 T=Unknown S=0 F=0 B=0 BK=0 P=79 Name=auto L=40 PPK=2 FakeLParens= FakeRParens=0 II=0x24bf510 Text='auto'
M=0 C=1 T=PointerOrReference S=1 F=0 B=0 BK=0 P=250 Name=ampamp L=43 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='&&'
M=0 C=1 T=StartOfName S=0 F=0 B=0 BK=0 P=260 Name=identifier L=46 PPK=2 FakeLParens= FakeRParens=0 II=0x24c3780 Text='ite'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=63 Name=r_paren L=47 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=')'
M=0 C=1 T=LambdaArrow S=1 F=0 B=0 BK=0 P=150 Name=arrow L=50 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='->'
M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=43 Name=auto L=55 PPK=2 FakeLParens= FakeRParens=0 II=0x24bf510 Text='auto'
M=0 C=1 T=PointerOrReference S=1 F=0 B=0 BK=0 P=230 Name=amp L=57 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='&'
M=0 C=0 T=Unknown S=1 F=0 B=0 BK=1 P=48 Name=l_brace L=59 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='{'
M=0 C=1 T=Unknown S=1 F=0 B=0 BK=0 P=61 Name=r_brace L=80 PPK=2 FakeLParens= FakeRParens=1 II=0x0 Text='}'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=43 Name=r_paren L=81 PPK=2 FakeLParens= FakeRParens=1 II=0x0 Text=')'
M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=23 Name=semi L=82 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=';'
It doesn't see this
M=0 C=0 T=Unknown S=1 F=0 B=0 BK=1 P=48 Name=l_brace L=59 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='{'
As a LamdaLBrace
Again I would say this was actually a failure elsewhere
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104222/new/
https://reviews.llvm.org/D104222
More information about the cfe-commits
mailing list