clang  11.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 151 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 168 of file Sanitizers.h.

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

◆ empty()

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

Returns true if no sanitizers are enabled.

Definition at line 171 of file Sanitizers.h.

Referenced by clang::CompilerInvocation::CreateFromArgs(), 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 153 of file Sanitizers.h.

References clang::SanitizerMask::isPowerOf2().

Referenced by addSanitizersAtO0(), clang::CompilerInvocation::CreateFromArgs(), 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::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNullabilityCheck(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::EmitUnreachable(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), 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(), PromotionIsPotentiallyEligibleForImplicitIntegerConversionCheck(), clang::CodeGen::CodeGenModule::Release(), clang::CodeGen::CodeGenFunction::sanitizePerformTypeCheck(), shouldEmitLifetimeMarkers(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::StartFunction(), and tryEmitFMulAdd().

◆ hasOneOf()

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

Check if one or more sanitizers are enabled.

Definition at line 159 of file Sanitizers.h.

Referenced by isAsanHwasanOrMemTag(), PromotionIsPotentiallyEligibleForImplicitIntegerConversionCheck(), 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: