Compute the source range of a TrailingWhereClause without tripping assertions.

Fixes rdar://problem/21001937.

Swift SVN r28825
This commit is contained in:
Doug Gregor
2015-05-20 05:31:09 +00:00
parent 1ae67e338c
commit 72f522ca7d
2 changed files with 6 additions and 2 deletions

View File

@@ -1482,8 +1482,7 @@ public:
/// Compute the source range containing this trailing where clause.
SourceRange getSourceRange() const {
return SourceRange(WhereLoc,
getRequirements().back().getSecondTypeLoc()
.getSourceRange().End);
getRequirements().back().getSourceRange().End);
}
};