[clang-tools-extra] 5298333 - [clangd] Disable support for clang-tidy suppression blocks (NOLINTBEGIN)

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 15 01:58:37 PST 2021


Author: Sam McCall
Date: 2021-12-15T10:58:30+01:00
New Revision: 529833377ccdf4381f8bc9961bfa96ec4f5e2eed

URL: https://github.com/llvm/llvm-project/commit/529833377ccdf4381f8bc9961bfa96ec4f5e2eed
DIFF: https://github.com/llvm/llvm-project/commit/529833377ccdf4381f8bc9961bfa96ec4f5e2eed.diff

LOG: [clangd] Disable support for clang-tidy suppression blocks (NOLINTBEGIN)

The implementation is very inefficient and we pay the cost even when the feature is not used

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

Added: 
    

Modified: 
    clang-tools-extra/clangd/ParsedAST.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp
index 307db29dc1966..4b96725de4417 100644
--- a/clang-tools-extra/clangd/ParsedAST.cpp
+++ b/clang-tools-extra/clangd/ParsedAST.cpp
@@ -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;


        


More information about the cfe-commits mailing list