Handle errors in expansion of response files
authorSerge Pavlov <sepavloff@gmail.com>
Mon, 31 Oct 2022 05:59:15 +0000 (12:59 +0700)
committerSerge Pavlov <sepavloff@gmail.com>
Mon, 31 Oct 2022 08:36:41 +0000 (15:36 +0700)
commitfd3d7a9f8cbb5ad81fb96d92d5f7b1d51a4d4127
tree085b3e47f468106d61b52a438fb1617156afd46f
parent1af81ab4846f0d07d3ac3079f95d66779a4d9430
Handle errors in expansion of response files

Previously an error raised during an expansion of response files (including
configuration files) was ignored and only the fact of its presence was
reported to the user with generic error messages. This made it difficult to
analyze problems. For example, if a configuration file tried to read an
inexistent file, the error message said that 'configuration file cannot
be found', which is wrong and misleading.

This change enhances handling errors in the expansion so that users
could get more informative error messages.

Differential Revision: https://reviews.llvm.org/D136090
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Driver/Driver.cpp
clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp
clang/test/Driver/config-file-errs.c
clang/tools/driver/driver.cpp
clang/unittests/Driver/ToolChainTest.cpp
flang/tools/flang-driver/driver.cpp
llvm/include/llvm/Support/CommandLine.h
llvm/lib/Support/CommandLine.cpp
llvm/unittests/Support/CommandLineTest.cpp