mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #7042 from mxswd/assign-expr-getloc
Fall back to the AssignExprs startLoc when the EqualLoc is invalid
This commit is contained in:
@@ -4331,7 +4331,13 @@ public:
|
||||
|
||||
SourceLoc getEqualLoc() const { return EqualLoc; }
|
||||
|
||||
SourceLoc getLoc() const { return EqualLoc; }
|
||||
SourceLoc getLoc() const {
|
||||
SourceLoc loc = EqualLoc;
|
||||
if (loc.isValid()) {
|
||||
return loc;
|
||||
}
|
||||
return getStartLoc();
|
||||
}
|
||||
SourceLoc getStartLoc() const {
|
||||
if (!isFolded()) return EqualLoc;
|
||||
return ( Dest->getStartLoc().isValid()
|
||||
|
||||
Reference in New Issue
Block a user