-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"clangd
Description
HeuristicResolver::getPointeeType()
returns a Type *
rather than a QualType
, which means it necessarily discards any qualifiers on the returned pointee type.
Preserving the qualifiers can be important, as seen e.g. in clangd in the following code:
template <typename T>
struct Waldo {
void find();
void find() const;
};
template <typename T>
struct smart_ptr {
T* operator->();
};
template <typename T>
void foo(smart_ptr<const Waldo<T>> s) {
s->find();
}
Go-to-definition on the find
token in s->find()
offers both overloads of Waldo::find()
as results, when 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"clangd