[ConstraintSystem] Change missingArgument callback to produce an index of synthesized argument

In diagnostic mode allow argument matcher to synthesize new
arguments, which makes it much easier to diagnose problems
related to missing arguments.
This commit is contained in:
Pavel Yaskevich
2019-09-18 16:49:58 -07:00
parent 4203c2f9f3
commit b15ef15a60
4 changed files with 9 additions and 4 deletions

View File

@@ -36,7 +36,10 @@ MatchCallArgumentListener::~MatchCallArgumentListener() { }
void MatchCallArgumentListener::extraArgument(unsigned argIdx) { }
void MatchCallArgumentListener::missingArgument(unsigned paramIdx) { }
Optional<unsigned>
MatchCallArgumentListener::missingArgument(unsigned paramIdx) {
return None;
}
bool MatchCallArgumentListener::missingLabel(unsigned paramIdx) { return true; }
bool MatchCallArgumentListener::extraneousLabel(unsigned paramIdx) {