Address PR10616. The crash has already been fixed by Ted in r140725, so just refactor to use existing API + test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140932 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed