clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
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 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 157 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 176 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 179 of file Sanitizers.h.

References Mask.

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

◆ has()

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

◆ hasOneOf()

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

◆ set() [1/2]

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

Definition at line 173 of file Sanitizers.h.

References Mask.

◆ set() [2/2]

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

Enable or disable a certain (single) sanitizer.

Definition at line 168 of file Sanitizers.h.

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

Member Data Documentation

◆ Mask

SanitizerMask clang::SanitizerSet::Mask

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