[clang][Tooling] Fix potential UB in ExpandResponseFilesCompilationDatabase
authorSam McCall <sam.mccall@gmail.com>
Mon, 9 Dec 2019 11:04:05 +0000 (12:04 +0100)
committerSam McCall <sam.mccall@gmail.com>
Mon, 9 Dec 2019 11:24:23 +0000 (12:24 +0100)
commit966fac1941ea99e076a7654d229b27e1e6e4ad17
tree89086a8ea5a143a65d3debff3095b69391f59d83
parentf3e6a61232640f2ec78b97d44cc0b5ba12676a0d
[clang][Tooling] Fix potential UB in ExpandResponseFilesCompilationDatabase

Summary:
`vector::assign` will cause UB at here.

fixes: https://github.com/clangd/clangd/issues/223

Reviewers: kadircet, sammccall, hokein

Reviewed By: sammccall

Subscribers: merge_guards_bot, ilya-biryukov, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71172
clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp