HomePhabricator

[clang-tidy] Make the plugin honor NOLINT

Description

[clang-tidy] Make the plugin honor NOLINT

Instantiate a ClangTidyDiagnosticConsumer also for the plugin case and
let it forward the diagnostics to the external diagnostic engine that is
already in place.

One minor difference to the clang-tidy executable case is that the
compiler checks/diagnostics are referred to with their original name.
For example, for -Wunused-variable the plugin will refer to the check as
"-Wunused-variable" while the clang-tidy executable will refer to that
as "clang-diagnostic- unused-variable". This is because the compiler
diagnostics never reach ClangTidyDiagnosticConsumer.

Differential Revision: https://reviews.llvm.org/D61487

Details

Committed
nikJun 6 2019, 6:13 AM
Differential Revision
D61487: [clang-tidy] Make the plugin honor NOLINT
Parents
rL362701: [clang-tidy] Fix an assertion failure in misc-redundant-expression.
Branches
Unknown
Tags
Unknown