| Issue |
61435
|
| Summary |
`readability-misleading-indentation` broken for `if constexpr` inside of `namespace`
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Aster89
|
Related to #43835 and #31552.
Here's a minimal example:
```cpp
namespace {
template<int N>
constexpr auto lam = []{
if constexpr (N == 1) {
} else { // THAT
}
};
void foo() {
lam<2>();
}
}
```
where on `// THAT` line I get `Different indentation for 'if' and corresponding 'else' [readability-misleading-indentation]`. If I remove the enclosing `namespace {`, the warning disappears.
>From YCM info I read that
> clangd version 15.0.1 (https://github.com/ycm-core/llvm 708056a3d8259ce1d9fc0f15676d13b53cc23835)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs