Updated clone for D48116 by Nikolai, now also adds the clang driver flag and the test for it.
If clang has plugins they are also affected by this filtering.
Depending on the included files and the used warning flags, e.g. -
Weverything, a huge number of warnings can be reported for included
files. As processing that many diagnostics comes with a performance
impact and not all clients are interested in those diagnostics, add a
flag to skip them.
Why would we ever want to suppress diagnostics from *all* included files in the compiler mode?
That seems more appropriate in the tooling mode (e.g. IDE integration, etc.). However, that could probably be done without modifications of core clang bits, e.g. by writing a DiagnosticsConsumer that ignores diagnostics coming from outside the main file.