Skip to content
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
6 changes: 3 additions & 3 deletions include/swift/AST/AnyFunctionRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class AnyFunctionRef {
llvm_unreachable("unexpected AnyFunctionRef representation");
}

SourceLoc getLoc() const {
SourceLoc getLoc(bool SerializedOK = true) const {
if (auto afd = TheFunction.dyn_cast<AbstractFunctionDecl *>()) {
return afd->getLoc();
return afd->getLoc(SerializedOK);
}
if (auto ce = TheFunction.dyn_cast<AbstractClosureExpr *>()) {
return ce->getLoc();
Expand Down Expand Up @@ -269,7 +269,7 @@ class AnyFunctionRef {
}

friend SourceLoc extractNearestSourceLoc(AnyFunctionRef fn) {
return fn.getLoc();
return fn.getLoc(/*SerializedOK=*/false);
}

private:
Expand Down
2 changes: 1 addition & 1 deletion lib/AST/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8517,7 +8517,7 @@ void swift::simple_display(llvm::raw_ostream &out, AccessorKind kind) {
}

SourceLoc swift::extractNearestSourceLoc(const Decl *decl) {
auto loc = decl->getLoc();
auto loc = decl->getLoc(/*SerializedOK=*/false);
if (loc.isValid())
return loc;

Expand Down