]> granicus.if.org Git - clang/commit
[ConfigFiles] Update argument strings when merging argrument lists
authorSerge Pavlov <sepavloff@gmail.com>
Thu, 26 Apr 2018 06:28:47 +0000 (06:28 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Thu, 26 Apr 2018 06:28:47 +0000 (06:28 +0000)
commit727bd92953e203f32dc08053207a139c6d55be6c
tree906761866de7139064b7d6c6cce980aa4838ec3f
parentd91f4e423db19c536bafb81d6181b5d6bd0a0ecd
[ConfigFiles] Update argument strings when merging argrument lists

Implementation of `InputArgList` assumes its field `ArgStrings` contains
strings for each argument exactly in the same order. This condition was
broken when arguments from config file and from invocation were merged.

This change fixes https://bugs.llvm.org/show_bug.cgi?id=37196 (Clang
config files can crash argument handling).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330926 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Driver.cpp
test/Driver/Inputs/empty.cfg [new file with mode: 0644]
test/Driver/config-file4.c [new file with mode: 0644]