clang 22.0.0git
clang::SanitizerSet Struct Reference

#include "clang/Basic/Sanitizers.h"

Public Member Functions

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

Public Attributes

SanitizerMask Mask
 Bitmask of enabled sanitizers.

Detailed Description

Definition at line 172 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 195 of file Sanitizers.h.

References Mask.

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

◆ empty()

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

Returns true if no sanitizers are enabled.

Definition at line 198 of file Sanitizers.h.

References Mask.

Referenced by clang::CompilerInvocation::getModuleHash().

◆ has() [1/2]

bool clang::SanitizerSet::has ( SanitizerKind::SanitizerOrdinal O) const
inline

Definition at line 179 of file Sanitizers.h.

References clang::SanitizerMask::bitPosToMask(), and clang::ast_matchers::has.

◆ has() [2/2]

◆ hasOneOf()

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

Check if one or more sanitizers are enabled.

Definition at line 184 of file Sanitizers.h.

References Mask.

Referenced by InitializePredefinedMacros(), isAsanHwasanMemTagOrTysan(), and clang::CodeGen::SanitizerMetadata::reportGlobal().

◆ set() [1/2]

void clang::SanitizerSet::set ( SanitizerMask K)
inline

Definition at line 192 of file Sanitizers.h.

References Mask.

◆ set() [2/2]

Member Data Documentation

◆ Mask


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