[AST] rename some isXXX methods to getAsXXX

There's a group of methods in `DeclContext` with names that start with *is*,
such as `isClassOrClassExtensionContext()`. These names suggests a boolean
return value, while the methods actually return a type declaration. This
patch replaces the *is* prefix with *getAs* to better reflect their interface.
This commit is contained in:
Daniel Duan
2016-02-11 14:40:09 -08:00
parent fdc76b67a2
commit efe230774b
43 changed files with 163 additions and 158 deletions

View File

@@ -281,7 +281,7 @@ static SILFunction::ClassVisibility_t getClassVisibility(SILDeclRef constant) {
if (context->isExtensionContext())
return SILFunction::NotRelevant;
auto *classType = context->isClassOrClassExtensionContext();
auto *classType = context->getAsClassOrClassExtensionContext();
if (!classType || classType->isFinal())
return SILFunction::NotRelevant;