Skip to content

Commit 823113c

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 1e7d0d7 + e9bcca8 commit 823113c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

include/swift/AST/Expr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4656,7 +4656,8 @@ class AssignExpr : public Expr {
46564656
}
46574657
SourceLoc getEndLoc() const {
46584658
if (!isFolded()) return EqualLoc;
4659-
return (Src->getEndLoc().isValid() ? Src->getEndLoc() : Dest->getEndLoc());
4659+
auto SrcEnd = Src->getEndLoc();
4660+
return (SrcEnd.isValid() ? SrcEnd : Dest->getEndLoc());
46604661
}
46614662

46624663
/// True if the node has been processed by binary expression folding.

test/IDE/range_info_54276140.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This range info request used to take several minutes to get. Adding a test to make sure we don't lose track of it.
2+
// RUN: %target-swift-ide-test -range -pos=4:1 -end-pos=4:12 -source-filename %s | %FileCheck %s -check-prefix=CHECK1
3+
4+
all = "ALL"= "GET"= "POST"= "PUT"= "HEAD"= "DELETE"= "OPTIONS"= "TRACE"= "COPY"= "LOCK"= "MKCOL"= "MOVE"= "PURGE"= "PROPFIND"= "PROPPATCH"= "UNLOCK"= "REPORT"= "MKACTIVITY"= "CHECKOUT"= "MERGE"= "MSEARCH"= "NOTIFY"= "SUBSCRIBE"= "UNSUBSCRIBE"= "PATCH"= "SEARCH"= "CONNECT"= "ERROR"= "UNKNOWN"
5+
6+
// CHECK1: <ASTNodes>2</ASTNodes>

0 commit comments

Comments
 (0)