When used indent-lambda, the Indentation of lambda containing if-else is wrong.
code:
void func()
{
// if-else in immediately called lambda
int c = [] {
if (true) {
return 1;
} else {
return 2;
}
}();
}
I ran astye as follows:
$ astyle --version
Artistic Style Version 3.4.6
$ astyle --options=none --style=1tbs --indent-lambda indent-lambda.cpp
becomes:
@@ -5,8 +5,8 @@ void func()
int c = [] {
if (true) {
return 1;
- } else {
- return 2;
- }
- }();
+ } else {
+ return 2;
+ }
+}();
}
Yes, that is why you need to apply
--indent-lambdaas opt-in because this case is not covered ;)Hi, please try again with 3.6.10