Start naming functions more uniformly.

For any function that has a name, ensure that the name is a compound
name with argument names for each of the parameters. 


Swift SVN r16398
This commit is contained in:
Doug Gregor
2014-04-16 06:05:45 +00:00
parent db439c1a4a
commit e12afa2e1d
6 changed files with 39 additions and 35 deletions

View File

@@ -2205,6 +2205,15 @@ void FuncDecl::setDeserializedSignature(ArrayRef<Pattern *> ArgParams,
assert(ArgParams.size() == BodyParams.size());
assert(NumParamPatterns == ArgParams.size());
#ifndef NDEBUG
unsigned NumParams = getDeclContext()->isTypeContext()
? BodyParams[1]->numTopLevelVariables()
: BodyParams[0]->numTopLevelVariables();
auto Name = getFullName();
assert(!Name || !Name.isSimpleName() && "Must have a simple name");
assert(!Name || (Name.getArgumentNames().size() == NumParams));
#endif
for (unsigned i = 0; i != NumParamPatterns; ++i)
ArgParamsRef[i] = ArgParams[i];
for (unsigned i = 0; i != NumParamPatterns; ++i)