mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
Fix use-after-free in clang-apply-replacements
Accidentally introduced a dangling StringRef in b4c6dc2e66
.
Differential Revision: https://reviews.llvm.org/D131017
This commit is contained in:
parent
d7100b398b
commit
54110b8aa0
@ -24,6 +24,7 @@
|
||||
#include "clang/Tooling/ReplacementsYaml.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
@ -140,7 +141,7 @@ std::error_code collectReplacementsFromDirectory(
|
||||
static llvm::DenseMap<const FileEntry *, std::vector<tooling::Replacement>>
|
||||
groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,
|
||||
const clang::SourceManager &SM) {
|
||||
std::set<StringRef> Warned;
|
||||
llvm::StringSet<> Warned;
|
||||
llvm::DenseMap<const FileEntry *, std::vector<tooling::Replacement>>
|
||||
GroupedReplacements;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user