SourceManager: add functions that compare SourceLocs and SourceRanges

Swift SVN r6994
This commit is contained in:
Dmitri Hrybenko
2013-08-07 20:06:12 +00:00
parent 1659de21a1
commit 686f9ec7fc
6 changed files with 56 additions and 36 deletions

View File

@@ -973,9 +973,7 @@ namespace {
llvm_unreachable("impossible parent node");
}
// FIXME: This is a very ugly way to check inclusion.
if (Enclosing.Start.Value.getPointer() > Current.Start.Value.getPointer()
|| Enclosing.End.Value.getPointer() < Current.End.Value.getPointer()){
if (!Ctx.SourceMgr.rangeContains(Enclosing, Current)) {
Out << "child source range not contained within its parent: ";
printEntity();
Out << "\n parent range: ";