[clangd] Disable support for clang-tidy suppression blocks (NOLINTBEGIN)
authorSam McCall <sam.mccall@gmail.com>
Mon, 13 Dec 2021 18:16:33 +0000 (19:16 +0100)
committerSam McCall <sam.mccall@gmail.com>
Wed, 15 Dec 2021 09:58:30 +0000 (10:58 +0100)
The implementation is very inefficient and we pay the cost even when the feature is not used

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

clang-tools-extra/clangd/ParsedAST.cpp

index 307db29..4b96725 100644 (file)
@@ -395,7 +395,8 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
           if (IsInsideMainFile &&
               tidy::shouldSuppressDiagnostic(DiagLevel, Info, *CTContext,
                                              TidySuppressedErrors,
-                                             /*AllowIO=*/false)) {
+                                             /*AllowIO=*/false,
+                                             /*EnableNolintBlocks=*/false)) {
             // FIXME: should we expose the suppression error (invalid use of
             // NOLINT comments)?
             return DiagnosticsEngine::Ignored;