]> granicus.if.org Git - clang/commit
unique_ptr-ify FileSystemStatCache::setNextStatCache
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Aug 2014 21:29:24 +0000 (21:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Aug 2014 21:29:24 +0000 (21:29 +0000)
commit88b00c0761dc588d14d37517a71d96be9690119a
tree6b53663f6557d05a988f64717fc2360ddc0b2a83
parent3c853484df946083142451346998b142f5255b0f
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
include/clang/Basic/FileManager.h
include/clang/Basic/FileSystemStatCache.h
include/clang/Lex/PTHManager.h
lib/Basic/FileManager.cpp
lib/Frontend/CacheTokens.cpp
lib/Lex/PTHLexer.cpp
lib/Lex/Preprocessor.cpp
unittests/Basic/FileManagerTest.cpp