[clangd] Fix use-after-free in ArgStripper

This commit is contained in:
Sam McCall 2020-07-15 11:03:11 +02:00
parent 9697a9e2d3
commit f782d9c700
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/StringMap.h"
#include <deque>
#include <string>
#include <vector>
@ -92,7 +93,7 @@ private:
const Rule *matchingRule(llvm::StringRef Arg, unsigned Mode,
unsigned &ArgCount) const;
llvm::SmallVector<Rule, 4> Rules;
std::vector<std::string> Storage; // Store strings not found in option table.
std::deque<std::string> Storage; // Store strings not found in option table.
};
} // namespace clangd