clang 19.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
clang::DiagnosticStorage Struct Reference

#include "clang/Basic/Diagnostic.h"

Public Types

enum  { MaxArguments = 10 }
 

Public Member Functions

 DiagnosticStorage ()=default
 

Public Attributes

unsigned char NumDiagArgs = 0
 The number of entries in Arguments.
 
unsigned char DiagArgumentsKind [MaxArguments]
 Specifies for each argument whether it is in DiagArgumentsStr or in DiagArguments.
 
uint64_t DiagArgumentsVal [MaxArguments]
 The values for the various substitution positions.
 
std::string DiagArgumentsStr [MaxArguments]
 The values for the various substitution positions that have string arguments.
 
SmallVector< CharSourceRange, 8 > DiagRanges
 The list of ranges added to this diagnostic.
 
SmallVector< FixItHint, 6 > FixItHints
 If valid, provides a hint with some code to insert, remove, or modify at a particular position.
 

Detailed Description

Definition at line 148 of file Diagnostic.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxArguments 

The maximum number of arguments we can hold.

We currently only support up to 10 arguments (%0-%9).

A single diagnostic with more than that almost certainly has to be simplified anyway.

Definition at line 149 of file Diagnostic.h.

Constructor & Destructor Documentation

◆ DiagnosticStorage()

clang::DiagnosticStorage::DiagnosticStorage ( )
default

Member Data Documentation

◆ DiagArgumentsKind

unsigned char clang::DiagnosticStorage::DiagArgumentsKind[MaxArguments]

Specifies for each argument whether it is in DiagArgumentsStr or in DiagArguments.

Definition at line 163 of file Diagnostic.h.

Referenced by clang::StreamingDiagnostic::AddString(), clang::StreamingDiagnostic::AddTaggedVal(), clang::PartialDiagnostic::Emit(), clang::Diagnostic::getArgKind(), and clang::PartialDiagnostic::getStringArg().

◆ DiagArgumentsStr

std::string clang::DiagnosticStorage::DiagArgumentsStr[MaxArguments]

The values for the various substitution positions that have string arguments.

Definition at line 174 of file Diagnostic.h.

Referenced by clang::StreamingDiagnostic::AddString(), clang::PartialDiagnostic::Emit(), clang::Diagnostic::getArgStdStr(), and clang::PartialDiagnostic::getStringArg().

◆ DiagArgumentsVal

uint64_t clang::DiagnosticStorage::DiagArgumentsVal[MaxArguments]

The values for the various substitution positions.

This is used when the argument is not an std::string. The specific value is mangled into an uint64_t and the interpretation depends on exactly what sort of argument kind it is.

Definition at line 170 of file Diagnostic.h.

Referenced by clang::StreamingDiagnostic::AddTaggedVal(), clang::PartialDiagnostic::Emit(), clang::Diagnostic::getArgCStr(), clang::Diagnostic::getArgIdentifier(), clang::Diagnostic::getArgSInt(), clang::Diagnostic::getArgUInt(), and clang::Diagnostic::getRawArg().

◆ DiagRanges

SmallVector<CharSourceRange, 8> clang::DiagnosticStorage::DiagRanges

◆ FixItHints

SmallVector<FixItHint, 6> clang::DiagnosticStorage::FixItHints

If valid, provides a hint with some code to insert, remove, or modify at a particular position.

Definition at line 181 of file Diagnostic.h.

Referenced by clang::StreamingDiagnostic::AddFixItHint(), clang::PartialDiagnostic::Emit(), clang::Diagnostic::getFixItHint(), clang::Diagnostic::getFixItHints(), clang::Diagnostic::getNumFixItHints(), and clang::DiagnosticsEngine::Report().

◆ NumDiagArgs

unsigned char clang::DiagnosticStorage::NumDiagArgs = 0

The documentation for this struct was generated from the following file: