clang 8.0.0

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

`#include "clang/Basic/Sanitizers.h"`

Collaboration diagram for clang::SanitizerSet:
[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 = 0
| Bitmask of enabled sanitizers. More...

## Detailed Description

Definition at line 50 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 67 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 70 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 52 of file Sanitizers.h.

Referenced by 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::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::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 58 of file Sanitizers.h.

Referenced by clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), EmitIntegerTruncationCheckHelper(), clang::driver::SanitizerArgs::needsEsanRt(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), and clang::CodeGen::CodeGenFunction::StartFunction().

## ◆ set()

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

Enable or disable a certain (single) sanitizer.

Definition at line 61 of file Sanitizers.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), and clang::CodeGen::CodeGenFunction::StartFunction().

## Member Data Documentation

## ◆ Mask

SanitizerMask clang::SanitizerSet::Mask = 0

Bitmask of enabled sanitizers.

Definition at line 73 of file Sanitizers.h.

Referenced by checkLanguageOptions(), clang::CompilerInvocation::getModuleHash(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), and clang::CodeGen::CodeGenFunction::StartFunction().

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

- include/clang/Basic/Sanitizers.h