Issue 144585
Summary `modernize-use-trailing-return-type` might show desugared type in fix-it hint for lamdba
Labels clang-tidy
Assignees
Reporter firewave
    Split from #144509.

```cpp
#include <algorithm>
#include <vector>

void f()
{
    auto it2 = [](const std::vector<int>& v) {
        return std::find_if(v.cbegin(), v.cend(), [](int i) -> bool {
            return i == 0;
        });
    };
}
```

```
<source>:10:16: warning: use a trailing return type for this lambda [modernize-use-trailing-return-type]
 10 |     auto it2 = [](const std::vector<int>& v) {
      | ^
      |                                              -> __gnu_cxx::__normal_iterator<const int *, std::vector<int>>
```

https://godbolt.org/z/zzYMa4o5r

It should be suggesting `std::vector<int>::const_iterator`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to