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:
Maxwell Swadling
2017-01-26 20:47:49 +11:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -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()