clang-tools 19.0.0git
Namespaces | Macros | Functions
Diagnostics.cpp File Reference
#include "Diagnostics.h"
#include "../clang-tidy/ClangTidyDiagnosticConsumer.h"
#include "Compiler.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "support/Logger.h"
#include "clang/Basic/AllDiagnostics.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Token.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "clang/Basic/DiagnosticASTKinds.inc"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
#include "clang/Basic/DiagnosticCommentKinds.inc"
#include "clang/Basic/DiagnosticCommonKinds.inc"
#include "clang/Basic/DiagnosticDriverKinds.inc"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
#include "clang/Basic/DiagnosticLexKinds.inc"
#include "clang/Basic/DiagnosticParseKinds.inc"
#include "clang/Basic/DiagnosticRefactoringKinds.inc"
#include "clang/Basic/DiagnosticSemaKinds.inc"
#include "clang/Basic/DiagnosticSerializationKinds.inc"

Go to the source code of this file.

Namespaces

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

Macros

#define DIAG(ENUM, CLASS, DEFAULT_MAPPING, DESC, GROPU, SFINAE, NOWERROR, SHOWINSYSHEADER, SHOWINSYSMACRO, DEFERRABLE, CATEGORY)
 

Functions

llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const DiagBase &D)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const Fix &F)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const Diag &D)
 
Diag clang::clangd::toDiag (const llvm::SMDiagnostic &D, Diag::DiagSource Source)
 
void clang::clangd::toLSPDiags (const Diag &D, const URIForFile &File, const ClangdDiagnosticOptions &Opts, llvm::function_ref< void(clangd::Diagnostic, llvm::ArrayRef< Fix >)> OutFn)
 Conversion to LSP diagnostics.
 
int clang::clangd::getSeverity (DiagnosticsEngine::Level L)
 Convert from clang diagnostic level to LSP severity.
 
static void clang::clangd::writeCodeToFixMessage (llvm::raw_ostream &OS, llvm::StringRef Code)
 Sanitizes a piece for presenting it in a synthesized fix message.
 
static void clang::clangd::fillNonLocationData (DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info, clangd::DiagBase &D)
 Fills D with all information, except the location-related bits.
 
bool clang::clangd::isBuiltinDiagnosticSuppressed (unsigned ID, const llvm::StringSet<> &Suppressed, const LangOptions &)
 Determine whether a (non-clang-tidy) diagnostic is suppressed by config.
 
llvm::StringRef clang::clangd::normalizeSuppressedCode (llvm::StringRef)
 Take a user-specified diagnostic code, and convert it to a normalized form stored in the config and consumed by isBuiltinDiagnosticsSuppressed.
 
std::optional< std::string > clang::clangd::getDiagnosticDocURI (Diag::DiagSource, unsigned ID, llvm::StringRef Name)
 Returns a URI providing more information about a particular diagnostic.
 

Macro Definition Documentation

◆ DIAG

#define DIAG (   ENUM,
  CLASS,
  DEFAULT_MAPPING,
  DESC,
  GROPU,
  SFINAE,
  NOWERROR,
  SHOWINSYSHEADER,
  SHOWINSYSMACRO,
  DEFERRABLE,
  CATEGORY 
)
Value:
case clang::diag::ENUM: \
return #ENUM;