When passing a set of flags to configure defaults for a specific
target (similar to the cmake settings CLANG_DEFAULT_RTLIB,
CLANG_DEFAULT_UNWINDLIB, CLANG_DEFAULT_CXX_STDLIB and
CLANG_DEFAULT_LINKER, but without hardcoding it in the binary),
some of the flags may cause warnings (e.g. -stdlib= when compiling C
code). Allow requesting selectively ignoring unused arguments among
some of the arguments on the command line, without needing to resort
to -Qunused-arguments or -Wno-unused-command-line-argument.
Fix up the existing diagnostics.c testcase. It was added in
response to PR12181 to fix handling of
-Werror=unused-command-line-argument, but the command line option
in the test (-fzyzzybalubah) now triggers "error: unknown argument"
instead of the intended warning. Change it into a linker input
(-lfoo) which triggers the intended diagnostic. Extend the
existing test case to check more cases and make sure that it keeps
testing the intended case.
Add testing of the new option to this existing test.
The sentence will be scrubbed.
Use path/to/clang-tblgen -gen-opt-docs -I llvm/include -I clang/include/clang/Driver clang/include/clang/Driver/ClangOptionDocs.td > clang/docs/ClangCommandLineReference.rst to regenerate this rst.