Skip to content

AST: Remove FuncDecl::getReturnTypeLoc() #20955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5631,10 +5631,6 @@ class FuncDecl : public AbstractFunctionDecl {
return getSelfAccessKind() == SelfAccessKind::__Consuming;
}

TypeLoc getReturnTypeLoc() const {
return FnRetType;
}

SelfAccessKind getSelfAccessKind() const {
return static_cast<SelfAccessKind>(Bits.FuncDecl.SelfAccess);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/IDE/SyntaxModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ bool ModelASTWalker::walkToDeclPre(Decl *D) {
AFD->getSignatureSourceRange());
if (FD) {
SN.TypeRange = charSourceRangeFromSourceRange(SM,
FD->getReturnTypeLoc().getSourceRange());
FD->getBodyResultTypeLoc().getSourceRange());
}
pushStructureNode(SN, AFD);
} else if (auto *NTD = dyn_cast<NominalTypeDecl>(D)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4940,7 +4940,7 @@ diagnoseMissingAppendInterpolationMethod(TypeChecker &tc,
break;

case InvalidMethod::Reason::ReturnType:
tc.diagnose(invalidMethod.method->getReturnTypeLoc().getLoc(),
tc.diagnose(invalidMethod.method->getBodyResultTypeLoc().getLoc(),
diag::append_interpolation_void_or_discardable)
.fixItInsert(invalidMethod.method->getStartLoc(),
"@discardableResult ");
Expand Down