clang  14.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::sema::DelayedDiagnostic Class Reference

A diagnostic message which has been conditionally emitted pending the complete parsing of the current declaration. More...

#include "clang/Sema/DelayedDiagnostic.h"

Collaboration diagram for clang::sema::DelayedDiagnostic:
Collaboration graph
[legend]

Public Types

enum  DDKind : unsigned char { Availability, Access, ForbiddenType }
 

Public Member Functions

void Destroy ()
 
AccessedEntitygetAccessData ()
 
const AccessedEntitygetAccessData () const
 
const NamedDeclgetAvailabilityReferringDecl () const
 
const NamedDeclgetAvailabilityOffendingDecl () const
 
StringRef getAvailabilityMessage () const
 
ArrayRef< SourceLocationgetAvailabilitySelectorLocs () const
 
AvailabilityResult getAvailabilityResult () const
 
unsigned getForbiddenTypeDiagnostic () const
 The diagnostic ID to emit. More...
 
unsigned getForbiddenTypeArgument () const
 
QualType getForbiddenTypeOperand () const
 
const ObjCInterfaceDeclgetUnknownObjCClass () const
 
const ObjCPropertyDeclgetObjCProperty () const
 
bool getObjCPropertyAccess () const
 

Static Public Member Functions

static DelayedDiagnostic makeAvailability (AvailabilityResult AR, ArrayRef< SourceLocation > Locs, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, StringRef Msg, bool ObjCPropertyAccess)
 
static DelayedDiagnostic makeAccess (SourceLocation Loc, const AccessedEntity &Entity)
 
static DelayedDiagnostic makeForbiddenType (SourceLocation loc, unsigned diagnostic, QualType type, unsigned argument)
 

Public Attributes

DDKind Kind
 
bool Triggered
 
SourceLocation Loc
 
struct AD AvailabilityData
 
struct FTD ForbiddenTypeData
 
char AccessData [sizeof(AccessedEntity)]
 Access control. More...
 

Detailed Description

A diagnostic message which has been conditionally emitted pending the complete parsing of the current declaration.

Definition at line 124 of file DelayedDiagnostic.h.

Member Enumeration Documentation

◆ DDKind

Enumerator
Availability 
Access 
ForbiddenType 

Definition at line 126 of file DelayedDiagnostic.h.

Member Function Documentation

◆ Destroy()

void DelayedDiagnostic::Destroy ( )

◆ getAccessData() [1/2]

AccessedEntity& clang::sema::DelayedDiagnostic::getAccessData ( )
inline

Definition at line 168 of file DelayedDiagnostic.h.

References Access, AccessData, and Kind.

Referenced by Destroy(), clang::Sema::HandleDelayedAccessCheck(), and makeAccess().

◆ getAccessData() [2/2]

const AccessedEntity& clang::sema::DelayedDiagnostic::getAccessData ( ) const
inline

Definition at line 172 of file DelayedDiagnostic.h.

References Access, AccessData, and Kind.

◆ getAvailabilityMessage()

StringRef clang::sema::DelayedDiagnostic::getAvailabilityMessage ( ) const
inline

Definition at line 186 of file DelayedDiagnostic.h.

References Availability, AvailabilityData, and Kind.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getAvailabilityOffendingDecl()

const NamedDecl* clang::sema::DelayedDiagnostic::getAvailabilityOffendingDecl ( ) const
inline

Definition at line 182 of file DelayedDiagnostic.h.

References AvailabilityData.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getAvailabilityReferringDecl()

const NamedDecl* clang::sema::DelayedDiagnostic::getAvailabilityReferringDecl ( ) const
inline

Definition at line 177 of file DelayedDiagnostic.h.

References Availability, AvailabilityData, and Kind.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getAvailabilityResult()

AvailabilityResult clang::sema::DelayedDiagnostic::getAvailabilityResult ( ) const
inline

Definition at line 197 of file DelayedDiagnostic.h.

References Availability, AvailabilityData, and Kind.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getAvailabilitySelectorLocs()

ArrayRef<SourceLocation> clang::sema::DelayedDiagnostic::getAvailabilitySelectorLocs ( ) const
inline

Definition at line 191 of file DelayedDiagnostic.h.

References Availability, AvailabilityData, and Kind.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getForbiddenTypeArgument()

unsigned clang::sema::DelayedDiagnostic::getForbiddenTypeArgument ( ) const
inline

Definition at line 211 of file DelayedDiagnostic.h.

References ForbiddenType, ForbiddenTypeData, and Kind.

◆ getForbiddenTypeDiagnostic()

unsigned clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic ( ) const
inline

The diagnostic ID to emit.

Used like so: Diag(diag.Loc, diag.getForbiddenTypeDiagnostic()) << diag.getForbiddenTypeOperand() << diag.getForbiddenTypeArgument();

Definition at line 206 of file DelayedDiagnostic.h.

References ForbiddenType, ForbiddenTypeData, and Kind.

◆ getForbiddenTypeOperand()

QualType clang::sema::DelayedDiagnostic::getForbiddenTypeOperand ( ) const
inline

◆ getObjCProperty()

const ObjCPropertyDecl* clang::sema::DelayedDiagnostic::getObjCProperty ( ) const
inline

Definition at line 225 of file DelayedDiagnostic.h.

References AvailabilityData.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ getObjCPropertyAccess()

bool clang::sema::DelayedDiagnostic::getObjCPropertyAccess ( ) const
inline

Definition at line 229 of file DelayedDiagnostic.h.

References AvailabilityData.

◆ getUnknownObjCClass()

const ObjCInterfaceDecl* clang::sema::DelayedDiagnostic::getUnknownObjCClass ( ) const
inline

Definition at line 221 of file DelayedDiagnostic.h.

References AvailabilityData.

Referenced by clang::Sema::handleDelayedAvailabilityCheck().

◆ makeAccess()

static DelayedDiagnostic clang::sema::DelayedDiagnostic::makeAccess ( SourceLocation  Loc,
const AccessedEntity Entity 
)
inlinestatic

Definition at line 144 of file DelayedDiagnostic.h.

References Access, getAccessData(), Kind, Loc, and Triggered.

◆ makeAvailability()

DelayedDiagnostic DelayedDiagnostic::makeAvailability ( AvailabilityResult  AR,
ArrayRef< SourceLocation Locs,
const NamedDecl ReferringDecl,
const NamedDecl OffendingDecl,
const ObjCInterfaceDecl UnknownObjCClass,
const ObjCPropertyDecl ObjCProperty,
StringRef  Msg,
bool  ObjCPropertyAccess 
)
static

Definition at line 24 of file DelayedDiagnostic.cpp.

References Availability, AvailabilityData, Kind, Loc, memcpy(), and Triggered.

◆ makeForbiddenType()

static DelayedDiagnostic clang::sema::DelayedDiagnostic::makeForbiddenType ( SourceLocation  loc,
unsigned  diagnostic,
QualType  type,
unsigned  argument 
)
inlinestatic

Definition at line 154 of file DelayedDiagnostic.h.

References ForbiddenType, ForbiddenTypeData, Kind, Loc, and Triggered.

Member Data Documentation

◆ AccessData

char clang::sema::DelayedDiagnostic::AccessData[sizeof(AccessedEntity)]

Access control.

Definition at line 258 of file DelayedDiagnostic.h.

Referenced by getAccessData().

◆ AvailabilityData

struct AD clang::sema::DelayedDiagnostic::AvailabilityData

◆ ForbiddenTypeData

struct FTD clang::sema::DelayedDiagnostic::ForbiddenTypeData

◆ Kind

DDKind clang::sema::DelayedDiagnostic::Kind

◆ Loc

SourceLocation clang::sema::DelayedDiagnostic::Loc

◆ Triggered

bool clang::sema::DelayedDiagnostic::Triggered

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