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

#include <DelayedDiagnostic.h>

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

Public Types

enum  DDKind { Deprecation, Unavailable, Access, ForbiddenType }
 

Public Member Functions

void Destroy ()
 
AccessedEntitygetAccessData ()
 
const AccessedEntitygetAccessData () const
 
const NamedDeclgetDeprecationDecl () const
 
StringRef getDeprecationMessage () const
 
unsigned getForbiddenTypeDiagnostic () const
 
unsigned getForbiddenTypeArgument () const
 
QualType getForbiddenTypeOperand () const
 
const ObjCInterfaceDeclgetUnknownObjCClass () const
 
const ObjCPropertyDeclgetObjCProperty () const
 
bool getObjCPropertyAccess () const
 

Static Public Member Functions

static DelayedDiagnostic makeAvailability (Sema::AvailabilityDiagnostic AD, SourceLocation Loc, const NamedDecl *D, 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

unsigned char Kind
 
bool Triggered
 
SourceLocation Loc
 
struct DD DeprecationData
 Deprecation. More...
 
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

Enumerator
Deprecation 
Unavailable 
Access 
ForbiddenType 

Definition at line 116 of file DelayedDiagnostic.h.

Member Function Documentation

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

Definition at line 158 of file DelayedDiagnostic.h.

References Access, and AccessData.

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

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

Definition at line 162 of file DelayedDiagnostic.h.

References Access, and AccessData.

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

Definition at line 167 of file DelayedDiagnostic.h.

References Deprecation, DeprecationData, and Unavailable.

Referenced by handleDelayedAvailabilityCheck().

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

Definition at line 173 of file DelayedDiagnostic.h.

References Deprecation, DeprecationData, and Unavailable.

Referenced by handleDelayedAvailabilityCheck().

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

Definition at line 189 of file DelayedDiagnostic.h.

References ForbiddenType, and ForbiddenTypeData.

Referenced by handleDelayedForbiddenType().

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

References ForbiddenType, and ForbiddenTypeData.

Referenced by handleDelayedForbiddenType().

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

Definition at line 203 of file DelayedDiagnostic.h.

References DeprecationData.

Referenced by handleDelayedAvailabilityCheck().

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

Definition at line 207 of file DelayedDiagnostic.h.

References DeprecationData.

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

Definition at line 199 of file DelayedDiagnostic.h.

References DeprecationData.

Referenced by handleDelayedAvailabilityCheck().

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

Definition at line 134 of file DelayedDiagnostic.h.

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

Referenced by CheckAccess().

DelayedDiagnostic DelayedDiagnostic::makeAvailability ( Sema::AvailabilityDiagnostic  AD,
SourceLocation  Loc,
const NamedDecl D,
const ObjCInterfaceDecl UnknownObjCClass,
const ObjCPropertyDecl ObjCProperty,
StringRef  Msg,
bool  ObjCPropertyAccess 
)
static
static DelayedDiagnostic clang::sema::DelayedDiagnostic::makeForbiddenType ( SourceLocation  loc,
unsigned  diagnostic,
QualType  type,
unsigned  argument 
)
inlinestatic

Member Data Documentation

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

Access control.

Definition at line 234 of file DelayedDiagnostic.h.

Referenced by getAccessData().

struct DD clang::sema::DelayedDiagnostic::DeprecationData
struct FTD clang::sema::DelayedDiagnostic::ForbiddenTypeData
unsigned char clang::sema::DelayedDiagnostic::Kind
SourceLocation clang::sema::DelayedDiagnostic::Loc
bool clang::sema::DelayedDiagnostic::Triggered

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