Skip to content

Commit f782d9c

Browse files
committed
[clangd] Fix use-after-free in ArgStripper
1 parent 9697a9e commit f782d9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang-tools-extra/clangd/CompileCommands.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "clang/Tooling/ArgumentsAdjusters.h"
1313
#include "clang/Tooling/CompilationDatabase.h"
1414
#include "llvm/ADT/StringMap.h"
15+
#include <deque>
1516
#include <string>
1617
#include <vector>
1718

@@ -92,7 +93,7 @@ class ArgStripper {
9293
const Rule *matchingRule(llvm::StringRef Arg, unsigned Mode,
9394
unsigned &ArgCount) const;
9495
llvm::SmallVector<Rule, 4> Rules;
95-
std::vector<std::string> Storage; // Store strings not found in option table.
96+
std::deque<std::string> Storage; // Store strings not found in option table.
9697
};
9798

9899
} // namespace clangd

0 commit comments

Comments
 (0)