-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
In clangd/clangd#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:
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.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"