unique_ptr-ify FileSystemStatCache::setNextStatCache
And in the process, discover that FileManager::removeStatCache had a double-delete when removing an element from the middle of the list (at the beginning or the end of the list, there was no problem) and add a unit test to exercise the code path (which successfully crashed when run (with modifications to match the old API) without this patch applied) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215388 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/FileManager.h 2 additions, 1 deletioninclude/clang/Basic/FileManager.h
- include/clang/Basic/FileSystemStatCache.h 2 additions, 2 deletionsinclude/clang/Basic/FileSystemStatCache.h
- include/clang/Lex/PTHManager.h 1 addition, 1 deletioninclude/clang/Lex/PTHManager.h
- lib/Basic/FileManager.cpp 6 additions, 6 deletionslib/Basic/FileManager.cpp
- lib/Frontend/CacheTokens.cpp 4 additions, 2 deletionslib/Frontend/CacheTokens.cpp
- lib/Lex/PTHLexer.cpp 2 additions, 2 deletionslib/Lex/PTHLexer.cpp
- lib/Lex/Preprocessor.cpp 1 addition, 0 deletionslib/Lex/Preprocessor.cpp
- unittests/Basic/FileManagerTest.cpp 22 additions, 13 deletionsunittests/Basic/FileManagerTest.cpp
Loading
Please register or sign in to comment