Fixed toHalfOpenFileRange assertion fail

Summary:
- Added new function that gets Expansion range with both ends in the same file.
- Fixes the crash at https://github.com/clangd/clangd/issues/113

Subscribers: ilya-biryukov, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65754

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@368058 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed