The cInstantiate a Clang-tidy standalone tool implementsTidyDiagnosticConsumer also for the NOLINT filtering inplugin case and
ClangTidyDlet it forward the diagnosticConsumer::HandleDs to the external diagnostic. For the plugin case no engine that is
ClangTidyDiagnosticConsumer is set up as it would have side effects withalready in place.
One minor difference to the clang-tidy executable case is that the
the already set up diagnostic consumer.
This change introduces filtering in ClangTidyContext::diag() and returncompiler checks/diagnostics are referred to with their original name.
For example, for -Wunused-variable the plugin will refer to the check as
an active dummy DiagnosticBuilder in case the check was NOLINT-ed, so"-Wunused-variable" while the clang-tidy executable will refer to that
that no check needs to be adaptedas "clang-diagnostic- unused-variable". The filtering in HandleDiagnosticThis is because the compiler
needs to stay there as it is still relevant for non-tidy ddiagnostics never reach ClangTidyDiagnosticsConsumer.