Have SourceManager::getLocForEndOfFile() point at the "EOF" location of the FileID.
This fixes a crash due to SourceManager::getLocForEndOfFile() returning an off-by-one location when the the FileID is for an empty file. rdar://13803893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181285 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/SourceManager.h 1 addition, 1 deletioninclude/clang/Basic/SourceManager.h
- lib/Rewrite/Frontend/InclusionRewriter.cpp 1 addition, 1 deletionlib/Rewrite/Frontend/InclusionRewriter.cpp
- test/Index/Inputs/empty.h 0 additions, 0 deletionstest/Index/Inputs/empty.h
- test/Index/file-includes.c 3 additions, 0 deletionstest/Index/file-includes.c
Loading
Please register or sign in to comment