clang  14.0.0git
Classes | Namespaces | Macros | Functions
Sanitizers.h File Reference
#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"
Include dependency graph for Sanitizers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 llvm
 
 clang
 

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. More...
 
void clang::serializeSanitizerSet (SanitizerSet Set, SmallVectorImpl< StringRef > &Values)
 Serialize a SanitizerSet into values for -fsanitize= or -fno-sanitize=. More...
 
SanitizerMask clang::expandSanitizerGroups (SanitizerMask Kinds)
 For each sanitizer group bit set in Kinds, set the bits for sanitizers this group enables. More...
 
SanitizerMask clang::getPPTransparentSanitizers ()
 Return the sanitizers which do not affect preprocessing. More...
 
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 141 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.");

Definition at line 141 of file Sanitizers.h.

◆ SANITIZER_GROUP [1/2]

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

Definition at line 144 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.");

Definition at line 144 of file Sanitizers.h.

ALIAS
#define ALIAS(NAME, TOK, FLAGS)
clang::Builtin::ID
ID
Definition: Builtins.h:48