clang-tools  11.0.0git
Classes | Namespaces | Functions
ClangTidyDiagnosticConsumer.cpp File Reference
#include "ClangTidyDiagnosticConsumer.h"
#include "ClangTidyOptions.h"
#include "GlobList.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Attr.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/DiagnosticRenderer.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include <tuple>
#include <vector>
Include dependency graph for ClangTidyDiagnosticConsumer.cpp:

Go to the source code of this file.

Classes

class  clang::tidy::ClangTidyContext::CachedGlobList
 

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::tidy
 

Functions

static bool IsNOLINTFound (StringRef NolintDirectiveText, StringRef Line, unsigned DiagID, const ClangTidyContext &Context)
 
static llvm::Optional< StringRef > getBuffer (const SourceManager &SM, FileID File, bool AllowIO)
 
static bool LineIsMarkedWithNOLINT (const SourceManager &SM, SourceLocation Loc, unsigned DiagID, const ClangTidyContext &Context, bool AllowIO)
 
static bool LineIsMarkedWithNOLINTinMacro (const SourceManager &SM, SourceLocation Loc, unsigned DiagID, const ClangTidyContext &Context, bool AllowIO)
 
bool clang::tidy::shouldSuppressDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info, ClangTidyContext &Context, bool AllowIO=true)
 Check whether a given diagnostic should be suppressed due to the presence of a "NOLINT" suppression comment. More...
 

Function Documentation

◆ getBuffer()

static llvm::Optional<StringRef> getBuffer ( const SourceManager &  SM,
FileID  File,
bool  AllowIO 
)
static

Definition at line 305 of file ClangTidyDiagnosticConsumer.cpp.

◆ IsNOLINTFound()

static bool IsNOLINTFound ( StringRef  NolintDirectiveText,
StringRef  Line,
unsigned  DiagID,
const ClangTidyContext Context 
)
static

◆ LineIsMarkedWithNOLINT()

static bool LineIsMarkedWithNOLINT ( const SourceManager &  SM,
SourceLocation  Loc,
unsigned  DiagID,
const ClangTidyContext Context,
bool  AllowIO 
)
static

Definition at line 325 of file ClangTidyDiagnosticConsumer.cpp.

◆ LineIsMarkedWithNOLINTinMacro()

static bool LineIsMarkedWithNOLINTinMacro ( const SourceManager &  SM,
SourceLocation  Loc,
unsigned  DiagID,
const ClangTidyContext Context,
bool  AllowIO 
)
static

Definition at line 347 of file ClangTidyDiagnosticConsumer.cpp.