clang-tools 20.0.0git
Classes | Public Member Functions | List of all members
clang::tidy::NoLintDirectiveHandler Class Reference

This class is used to locate NOLINT comments in the file being analyzed, to decide whether a diagnostic should be suppressed. More...

#include <NoLintDirectiveHandler.h>

Classes

class  Impl
 

Public Member Functions

 NoLintDirectiveHandler ()
 
 ~NoLintDirectiveHandler ()
 
 NoLintDirectiveHandler (const NoLintDirectiveHandler &)=delete
 
NoLintDirectiveHandleroperator= (const NoLintDirectiveHandler &)=delete
 
bool shouldSuppress (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Diag, llvm::StringRef DiagName, llvm::SmallVectorImpl< tooling::Diagnostic > &NoLintErrors, bool AllowIO, bool EnableNoLintBlocks)
 

Detailed Description

This class is used to locate NOLINT comments in the file being analyzed, to decide whether a diagnostic should be suppressed.

This class keeps a cache of every NOLINT comment found so that files do not have to be repeatedly parsed each time a new diagnostic is raised.

Definition at line 30 of file NoLintDirectiveHandler.h.

Constructor & Destructor Documentation

◆ NoLintDirectiveHandler() [1/2]

clang::tidy::NoLintDirectiveHandler::NoLintDirectiveHandler ( )

Definition at line 400 of file NoLintDirectiveHandler.cpp.

◆ ~NoLintDirectiveHandler()

clang::tidy::NoLintDirectiveHandler::~NoLintDirectiveHandler ( )
default

◆ NoLintDirectiveHandler() [2/2]

clang::tidy::NoLintDirectiveHandler::NoLintDirectiveHandler ( const NoLintDirectiveHandler )
delete

Member Function Documentation

◆ operator=()

NoLintDirectiveHandler & clang::tidy::NoLintDirectiveHandler::operator= ( const NoLintDirectiveHandler )
delete

◆ shouldSuppress()

bool clang::tidy::NoLintDirectiveHandler::shouldSuppress ( DiagnosticsEngine::Level  DiagLevel,
const Diagnostic Diag,
llvm::StringRef  DiagName,
llvm::SmallVectorImpl< tooling::Diagnostic > &  NoLintErrors,
bool  AllowIO,
bool  EnableNoLintBlocks 
)

The documentation for this class was generated from the following files: