clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::SanitizerSet Struct Reference

#include "clang/Basic/Sanitizers.h"

Collaboration diagram for clang::SanitizerSet:
Collaboration graph
[legend]

Public Member Functions

bool has (SanitizerMask K) const
 Check if a certain (single) sanitizer is enabled. More...
 
bool hasOneOf (SanitizerMask K) const
 Check if one or more sanitizers are enabled. More...
 
void set (SanitizerMask K, bool Value)
 Enable or disable a certain (single) sanitizer. More...
 
void clear (SanitizerMask K=SanitizerKind::All)
 Disable the sanitizers specified in K. More...
 
bool empty () const
 Returns true if no sanitizers are enabled. More...
 

Public Attributes

SanitizerMask Mask
 Bitmask of enabled sanitizers. More...
 

Detailed Description

Definition at line 153 of file Sanitizers.h.

Member Function Documentation

◆ clear()

void clang::SanitizerSet::clear ( SanitizerMask  K = SanitizerKind::All)
inline

Disable the sanitizers specified in K.

Definition at line 170 of file Sanitizers.h.

References Mask.

Referenced by checkLanguageOptions(), and clang::CompilerInvocation::getModuleHash().

◆ empty()

bool clang::SanitizerSet::empty ( ) const
inline

Returns true if no sanitizers are enabled.

Definition at line 173 of file Sanitizers.h.

References Mask.

Referenced by clang::CompilerInvocation::getModuleHash(), and clang::driver::SanitizerArgs::hasAnySanitizer().

◆ has()

bool clang::SanitizerSet::has ( SanitizerMask  K) const
inline

Check if a certain (single) sanitizer is enabled.

Definition at line 155 of file Sanitizers.h.

References clang::SanitizerMask::isPowerOf2(), and Mask.

Referenced by addSanitizers(), clang::CodeGen::CodeGenModule::CreateFunctionTypeMetadataForIcall(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumptionCheck(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), clang::CodeGen::CodeGenFunction::EmitCfiSlowPathCheck(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNonNullArgCheck(), clang::CodeGen::CodeGenFunction::EmitNullabilityCheck(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitReturnValueCheck(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), clang::CodeGen::CodeGenFunction::EmitUnreachable(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCall(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCast(), clang::CodeGen::CodeGenFunction::EmitVTableTypeCheckedLoad(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::markAsIgnoreThreadCheckingAtRuntime(), clang::CodeGen::CodeGenModule::NeedAllVtablesTypeId(), clang::driver::SanitizerArgs::needsAsanRt(), clang::driver::SanitizerArgs::needsDfsanRt(), clang::driver::SanitizerArgs::needsFuzzer(), clang::driver::SanitizerArgs::needsHwasanRt(), clang::driver::SanitizerArgs::needsLsanRt(), clang::driver::SanitizerArgs::needsMsanRt(), clang::driver::SanitizerArgs::needsScudoRt(), clang::driver::SanitizerArgs::needsTsanRt(), clang::CodeGen::CodeGenModule::Release(), clang::CodeGen::CodeGenFunction::sanitizePerformTypeCheck(), shouldEmitLifetimeMarkers(), clang::CodeGen::CodeGenFunction::ShouldEmitVTableTypeCheckedLoad(), and clang::CodeGen::CodeGenFunction::StartFunction().

◆ hasOneOf()

bool clang::SanitizerSet::hasOneOf ( SanitizerMask  K) const
inline

Check if one or more sanitizers are enabled.

Definition at line 161 of file Sanitizers.h.

References Mask.

Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), isAsanHwasanOrMemTag(), and clang::CodeGen::CodeGenFunction::StartFunction().

◆ set()

void clang::SanitizerSet::set ( SanitizerMask  K,
bool  Value 
)
inline

Member Data Documentation

◆ Mask

SanitizerMask clang::SanitizerSet::Mask

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