AST: Summarize a commonly used call chain in AbstractFunctionDecl. NFC (#8424)

This commit is contained in:
Xi Ge
2017-03-30 10:51:10 -07:00
committed by GitHub
parent 9208e91837
commit 75e191f5ac
5 changed files with 15 additions and 5 deletions

View File

@@ -189,8 +189,7 @@ static std::tuple<char, ObjCSelector, CanType>
getDynamicResultSignature(ValueDecl *decl) {
if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
// Handle functions.
auto type =
decl->getInterfaceType()->castTo<AnyFunctionType>()->getResult();
auto type = func->getMethodInterfaceType();
return std::make_tuple(func->isStatic(), func->getObjCSelector(),
type->getCanonicalType());
}