clang 19.0.0git
Classes | Namespaces | Typedefs | Functions | Variables
Diagnostic.h File Reference

Defines the Diagnostic-related interfaces. More...

#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/Compiler.h"
#include <cassert>
#include <cstdint>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  clang::FixItHint
 Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the problem. More...
 
struct  clang::DiagnosticStorage
 
class  clang::DiagnosticsEngine
 Concrete class used by the front-end to report problems and issues. More...
 
class  clang::DiagnosticErrorTrap
 RAII class that determines when any errors have occurred between the time the instance was created and the time it was queried. More...
 
class  clang::StreamingDiagnostic
 The streaming interface shared between DiagnosticBuilder and PartialDiagnostic. More...
 
class  clang::StreamingDiagnostic::DiagStorageAllocator
 An allocator for DiagnosticStorage objects, which uses a small cache to objects, used to reduce malloc()/free() traffic for partial diagnostics. More...
 
class  clang::DiagnosticBuilder
 A little helper class used to produce diagnostics. More...
 
struct  clang::AddFlagValue
 
class  clang::Diagnostic
 A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) that allows clients to enquire about the currently in-flight diagnostic. More...
 
class  clang::StoredDiagnostic
 Represents a diagnostic in a form that can be retained until its corresponding source manager is destroyed. More...
 
class  clang::DiagnosticConsumer
 Abstract interface, implemented by clients of the front-end, which formats and prints fully processed diagnostics. More...
 
class  clang::IgnoringDiagConsumer
 A diagnostic client that ignores all diagnostics. More...
 
class  clang::ForwardingDiagnosticConsumer
 Diagnostic consumer that forwards diagnostics along to an existing, already-initialized diagnostic consumer. More...
 
struct  clang::TemplateDiffTypes
 

Namespaces

namespace  llvm
 YAML serialization mapping.
 
namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::tok
 

Typedefs

using clang::DiagNullabilityKind = std::pair< NullabilityKind, bool >
 A nullability kind paired with a bit indicating whether it used a context-sensitive keyword.
 

Functions

const DiagnosticBuilder & clang::operator<< (const DiagnosticBuilder &DB, const AddFlagValue V)
 Register a value for the flag in the current diagnostic.
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, StringRef S)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const char *Str)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, int I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, long I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, long long I)
 
template<typename T >
std::enable_if_t< std::is_same< T, bool >::value, const StreamingDiagnostic & > clang::operator<< (const StreamingDiagnostic &DB, T I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, unsigned I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, unsigned long I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, unsigned long long I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, tok::TokenKind I)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const IdentifierInfo *II)
 
template<typename T >
std::enable_if_t< std::is_same< std::remove_const_t< T >, DeclContext >::value, const StreamingDiagnostic & > clang::operator<< (const StreamingDiagnostic &DB, T *DC)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, SourceLocation L)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, SourceRange R)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, ArrayRef< SourceRange > Ranges)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const CharSourceRange &R)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const FixItHint &Hint)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, ArrayRef< FixItHint > Hints)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const std::optional< SourceRange > &Opt)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const std::optional< CharSourceRange > &Opt)
 
const StreamingDiagnostic & clang::operator<< (const StreamingDiagnostic &DB, const std::optional< FixItHint > &Opt)
 
const StreamingDiagnosticclang::operator<< (const StreamingDiagnostic &DB, DiagNullabilityKind nullability)
 
const StreamingDiagnosticclang::operator<< (const StreamingDiagnostic &DB, llvm::Error &&E)
 
llvm::raw_ostream & clang::operator<< (llvm::raw_ostream &OS, const StoredDiagnostic &)
 
void clang::ProcessWarningOptions (DiagnosticsEngine &Diags, const DiagnosticOptions &Opts, bool ReportDiags=true)
 ProcessWarningOptions - Initialize the diagnostic client and process the warning options specified on the command line.
 
void clang::EscapeStringForDiagnostic (StringRef Str, SmallVectorImpl< char > &OutStr)
 EscapeStringForDiagnostic - Append Str to the diagnostic buffer, escaping non-printable characters and ill-formed code unit sequences.
 

Variables

const char clang::ToggleHighlight = 127
 Special character that the diagnostic printer will use to toggle the bold attribute.
 

Detailed Description

Defines the Diagnostic-related interfaces.

Definition in file Diagnostic.h.