clang 20.0.0git
Classes | Namespaces | Macros | Functions
Sanitizers.h File Reference

Defines the clang::SanitizerKind enum. More...

#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/HashBuilder.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
#include <cassert>
#include <cstdint>
#include "clang/Basic/Sanitizers.def"

Go to the source code of this file.

Classes

class  clang::SanitizerMask
 
struct  clang::SanitizerKind
 
struct  clang::SanitizerSet
 

Namespaces

namespace  llvm
 Diagnostic wrappers for TextAPI types for error reporting.
 
namespace  llvm::opt
 
namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define SANITIZER(NAME, ID)   SO_##ID,
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)   SO_##ID##Group,
 
#define SANITIZER(NAME, ID)
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)
 

Functions

llvm::hash_code clang::hash_value (const clang::SanitizerMask &Arg)
 
SanitizerMask clang::parseSanitizerValue (StringRef Value, bool AllowGroups)
 Parse a single value from a -fsanitize= or -fno-sanitize= value list.
 
void clang::serializeSanitizerSet (SanitizerSet Set, SmallVectorImpl< StringRef > &Values)
 Serialize a SanitizerSet into values for -fsanitize= or -fno-sanitize=.
 
SanitizerMask clang::expandSanitizerGroups (SanitizerMask Kinds)
 For each sanitizer group bit set in Kinds, set the bits for sanitizers this group enables.
 
SanitizerMask clang::getPPTransparentSanitizers ()
 Return the sanitizers which do not affect preprocessing.
 
StringRef clang::AsanDtorKindToString (llvm::AsanDtorKind kind)
 
llvm::AsanDtorKind clang::AsanDtorKindFromString (StringRef kind)
 
StringRef clang::AsanDetectStackUseAfterReturnModeToString (llvm::AsanDetectStackUseAfterReturnMode mode)
 
llvm::AsanDetectStackUseAfterReturnMode clang::AsanDetectStackUseAfterReturnModeFromString (StringRef modeStr)
 

Detailed Description

Defines the clang::SanitizerKind enum.

Definition in file Sanitizers.h.

Macro Definition Documentation

◆ SANITIZER [1/2]

#define SANITIZER (   NAME,
  ID 
)    SO_##ID,

Definition at line 145 of file Sanitizers.h.

◆ SANITIZER [2/2]

#define SANITIZER (   NAME,
  ID 
)
Value:
static constexpr SanitizerMask ID = SanitizerMask::bitPosToMask(SO_##ID); \
static_assert(SanitizerMask::checkBitPos(SO_##ID), "Bit position too big.");
static char ID
Definition: Arena.cpp:183

Definition at line 145 of file Sanitizers.h.

◆ SANITIZER_GROUP [1/2]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)    SO_##ID##Group,

Definition at line 148 of file Sanitizers.h.

◆ SANITIZER_GROUP [2/2]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)
Value:
static constexpr SanitizerMask ID = SanitizerMask(ALIAS); \
static constexpr SanitizerMask ID##Group = \
SanitizerMask::bitPosToMask(SO_##ID##Group); \
static_assert(SanitizerMask::checkBitPos(SO_##ID##Group), \
"Bit position too big.");
#define ALIAS(NAME, TOK, FLAGS)

Definition at line 148 of file Sanitizers.h.