| Issue |
124445
|
| Summary |
Improve `auto` type deduction in HeuristicResolver
|
| Labels |
clang:frontend
|
| Assignees |
HighCommander4
|
| Reporter |
HighCommander4
|
In https://github.com/clangd/clangd/issues/897 I added rudimentary support for `auto` type deduction to `HeuristicResolver`, but the accuracy could be improved further.
As an example, the implementation does not currently propagate the `const` when deducing `const auto`.
This can be seen in clangd with the following code example:
```c++
template <typename T>
struct A {
void waldo();
void waldo() const;
};
template <typename T>
void foo(A<T> a) {
const auto copy = a;
copy.waldo();
}
```
Go-to-definition on the `waldo` token in `copy.waldo()` offers both overloads as candidates, but it should only offer the `const` overload.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs