Various improvements to function overload resolution.

Generalize the overload resolution code to be based on estimating a
  cost for various overload options and picking the one with the
  minimal cost.
Add a step that considers type conversions that are guaranteed to
  not lose information in function overload resolution.
Print better diagnostics when we can't find an unambiguous match.
This commit is contained in:
Matt Pharr
2011-10-16 20:46:56 -04:00
parent 209d093720
commit 39ed7e14b2
3 changed files with 250 additions and 66 deletions

2
expr.h
View File

@@ -269,7 +269,7 @@ public:
private:
void resolveFunctionOverloads(bool exactMatchOnly);
bool tryResolve(bool (*matchFunc)(Expr *, const Type *));
bool tryResolve(int (*matchFunc)(Expr *, const Type *));
};