Skip to content

HeuristicResolver incorrectly applies const-checking to static methods called through an instance #125164

Closed
@HighCommander4

Description

@HighCommander4

In the following code:

template <typename T>
struct Waldo {
  static void find();
};

template <typename T>
void foo(const Waldo<T>& t) {
  t.find();
}

HeuristicResolver fails to resolve the call to t.find() to Waldo::find() because it's applying const-checking even though that doesn't apply to static methods (even if you call them through an instance, as in this example).

Metadata

Metadata

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions