clang  7.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

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

Member Enumeration Documentation

◆ DDKind


Definition at line 131 of file DelayedDiagnostic.h.

Member Function Documentation

◆ Destroy()

void DelayedDiagnostic::Destroy ( )

◆ getAccessData() [1/2]

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

Definition at line 174 of file DelayedDiagnostic.h.

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

◆ getAccessData() [2/2]

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

Definition at line 178 of file DelayedDiagnostic.h.

◆ getAvailabilityMessage()

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

Definition at line 192 of file DelayedDiagnostic.h.

◆ getAvailabilityOffendingDecl()

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

Definition at line 188 of file DelayedDiagnostic.h.

◆ getAvailabilityReferringDecl()

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

Definition at line 183 of file DelayedDiagnostic.h.

◆ getAvailabilityResult()

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

Definition at line 197 of file DelayedDiagnostic.h.

◆ getForbiddenTypeArgument()

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

Definition at line 211 of file DelayedDiagnostic.h.

◆ getForbiddenTypeDiagnostic()

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

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.

◆ getForbiddenTypeOperand()

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

Definition at line 216 of file DelayedDiagnostic.h.

References clang::QualType::getFromOpaquePtr().

◆ getObjCProperty()

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

Definition at line 225 of file DelayedDiagnostic.h.

◆ getObjCPropertyAccess()

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

Definition at line 229 of file DelayedDiagnostic.h.

◆ getUnknownObjCClass()

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

Definition at line 221 of file DelayedDiagnostic.h.

◆ makeAccess()

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

◆ makeAvailability()

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

Definition at line 25 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 

Member Data Documentation

◆ AccessData

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

Access control.

Definition at line 256 of file DelayedDiagnostic.h.

◆ AvailabilityData

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

Definition at line 252 of file DelayedDiagnostic.h.

Referenced by Destroy(), and makeAvailability().

◆ ForbiddenTypeData

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

Definition at line 253 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: