clang  10.0.0svn
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 150 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 167 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 170 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 152 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(), EmitIntegerTruncationCheckHelper(), 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::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::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::StartFunction(), tryEmitFMulAdd(), and clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::~InlinedInheritingConstructorScope().

◆ hasOneOf()

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

Check if one or more sanitizers are enabled.

Definition at line 158 of file Sanitizers.h.

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