clang  6.0.0svn
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
 
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, SourceLocation Loc, 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 114 of file DelayedDiagnostic.h.

Member Enumeration Documentation

◆ DDKind

Enumerator
Availability 
Access 
ForbiddenType 

Definition at line 116 of file DelayedDiagnostic.h.

Member Function Documentation

◆ Destroy()

void DelayedDiagnostic::Destroy ( )

◆ getAccessData() [1/2]

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

Definition at line 159 of file DelayedDiagnostic.h.

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

◆ getAccessData() [2/2]

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

Definition at line 163 of file DelayedDiagnostic.h.

◆ getAvailabilityMessage()

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

Definition at line 177 of file DelayedDiagnostic.h.

◆ getAvailabilityOffendingDecl()

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

Definition at line 173 of file DelayedDiagnostic.h.

◆ getAvailabilityReferringDecl()

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

Definition at line 168 of file DelayedDiagnostic.h.

◆ getAvailabilityResult()

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

Definition at line 182 of file DelayedDiagnostic.h.

◆ getForbiddenTypeArgument()

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

Definition at line 196 of file DelayedDiagnostic.h.

◆ 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 191 of file DelayedDiagnostic.h.

◆ getForbiddenTypeOperand()

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

Definition at line 201 of file DelayedDiagnostic.h.

References clang::QualType::getFromOpaquePtr().

◆ getObjCProperty()

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

Definition at line 210 of file DelayedDiagnostic.h.

◆ getObjCPropertyAccess()

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

Definition at line 214 of file DelayedDiagnostic.h.

◆ getUnknownObjCClass()

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

Definition at line 206 of file DelayedDiagnostic.h.

◆ makeAccess()

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

◆ makeAvailability()

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

Definition at line 23 of file DelayedDiagnostic.cpp.

References Availability, AvailabilityData, Kind, Loc, and Triggered.

◆ makeForbiddenType()

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

Member Data Documentation

◆ AccessData

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

Access control.

Definition at line 242 of file DelayedDiagnostic.h.

◆ AvailabilityData

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

Definition at line 238 of file DelayedDiagnostic.h.

Referenced by Destroy(), and makeAvailability().

◆ ForbiddenTypeData

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

Definition at line 239 of file DelayedDiagnostic.h.

Referenced by makeForbiddenType().

◆ 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: