forked from OSchip/llvm-project
[clangd] Re-enable clang-tidy's nolint blocks
The previous inefficient implementation is polished. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D119701
This commit is contained in:
parent
f66d3758bd
commit
eb265e3ba2
|
@ -467,7 +467,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
|
|||
if (IsInsideMainFile && CTContext->shouldSuppressDiagnostic(
|
||||
DiagLevel, Info, TidySuppressedErrors,
|
||||
/*AllowIO=*/false,
|
||||
/*EnableNolintBlocks=*/false)) {
|
||||
/*EnableNolintBlocks=*/true)) {
|
||||
// FIXME: should we expose the suppression error (invalid use of
|
||||
// NOLINT comments)?
|
||||
return DiagnosticsEngine::Ignored;
|
||||
|
|
|
@ -477,9 +477,8 @@ TEST(DiagnosticTest, ClangTidySuppressionComment) {
|
|||
#define BAD2 BAD
|
||||
double h = BAD2; // NOLINT
|
||||
// NOLINTBEGIN
|
||||
// FIXME: re-enable when NOLINTBEGIN suppresss block is enabled in clangd.
|
||||
// double x = BAD2;
|
||||
// double y = BAD2;
|
||||
double x = BAD2;
|
||||
double y = BAD2;
|
||||
// NOLINTEND
|
||||
|
||||
// verify no crashes on unmatched nolints.
|
||||
|
|
Loading…
Reference in New Issue