Handle errors in expansion of response files
authorSerge Pavlov <sepavloff@gmail.com>
Fri, 14 Oct 2022 13:07:09 +0000 (20:07 +0700)
committerSerge Pavlov <sepavloff@gmail.com>
Sat, 29 Oct 2022 15:01:47 +0000 (22:01 +0700)
commit17eb198de934eced784e16ec15e020a574ba07e1
treebf58a5eb0a64bf65e32f77ef3b7e4781edaeb9da
parentd344146857aa105a24e06f2526d88e96c5865d00
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