HomePhabricator

[clang-tidy] Make the plugin honor NOLINT

Authored by nik on Jun 6 2019, 6:13 AM.

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

llvm-svn: 362702

Details

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