Print better error messages when function overload resolution fails.

This commit is contained in:
Matt Pharr
2011-12-14 11:41:34 -08:00
parent 891919074e
commit 89a5248f4f
3 changed files with 41 additions and 114 deletions

5
expr.h
View File

@@ -634,13 +634,14 @@ public:
being done just given type information without the parameter
argument expressions being available. It returns true on success.
*/
bool ResolveOverloads(const std::vector<const Type *> &argTypes,
bool ResolveOverloads(SourcePos argPos,
const std::vector<const Type *> &argTypes,
const std::vector<bool> *argCouldBeNULL = NULL);
Symbol *GetMatchingFunction();
private:
bool tryResolve(int (*matchFunc)(const Type *, const Type *),
const std::vector<const Type *> &argTypes,
SourcePos argPos, const std::vector<const Type *> &argTypes,
const std::vector<bool> *argCouldBeNULL);
/** Name of the function that is being called. */