clang 20.0.0git
Namespaces | Macros | Functions | Variables
Sanitizers.cpp File Reference
#include "clang/Basic/Sanitizers.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <optional>
#include "clang/Basic/Sanitizers.def"

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define SANITIZER(NAME, ID)   constexpr SanitizerMask SanitizerKind::ID;
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)
 
#define SANITIZER(NAME, ID)   .Case(NAME, SanitizerKind::ID)
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)    .Case(NAME, AllowGroups ? SanitizerKind::ID##Group : SanitizerMask())
 
#define SANITIZER(NAME, ID)   .StartsWith(NAME "=", SanitizerKind::ID)
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)
 
#define SANITIZER(NAME, ID)
 
#define SANITIZER(NAME, ID)
 
#define SANITIZER(NAME, ID)
 
#define SANITIZER_GROUP(NAME, ID, ALIAS)
 

Functions

llvm::hash_code clang::hash_value (const clang::SanitizerMask &Arg)
 
StringRef clang::AsanDtorKindToString (llvm::AsanDtorKind kind)
 
llvm::AsanDtorKind clang::AsanDtorKindFromString (StringRef kind)
 
StringRef clang::AsanDetectStackUseAfterReturnModeToString (llvm::AsanDetectStackUseAfterReturnMode mode)
 
llvm::AsanDetectStackUseAfterReturnMode clang::AsanDetectStackUseAfterReturnModeFromString (StringRef modeStr)
 

Variables

static const double SanitizerMaskCutoffsEps = 0.000000001f
 

Macro Definition Documentation

◆ SANITIZER [1/6]

#define SANITIZER (   NAME,
  ID 
)    constexpr SanitizerMask SanitizerKind::ID;

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER [2/6]

#define SANITIZER (   NAME,
  ID 
)    .Case(NAME, SanitizerKind::ID)

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER [3/6]

#define SANITIZER (   NAME,
  ID 
)    .StartsWith(NAME "=", SanitizerKind::ID)

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER [4/6]

#define SANITIZER (   NAME,
  ID 
)
Value:
if (Set.has(SanitizerKind::ID)) \
Values.push_back(NAME);

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER [5/6]

#define SANITIZER (   NAME,
  ID 
)
Value:
if (auto C = Cutoffs[SanitizerKind::SO_##ID]) { \
std::string Str; \
llvm::raw_string_ostream OS(Str); \
OS << NAME "=" << llvm::format("%.8f", *C); \
Values.emplace_back(StringRef(Str).rtrim('0')); \
}

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER [6/6]

#define SANITIZER (   NAME,
  ID 
)

Definition at line 48 of file Sanitizers.cpp.

◆ SANITIZER_GROUP [1/4]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)
Value:
constexpr SanitizerMask SanitizerKind::ID; \
constexpr SanitizerMask SanitizerKind::ID##Group;

Definition at line 49 of file Sanitizers.cpp.

◆ SANITIZER_GROUP [2/4]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)     .Case(NAME, AllowGroups ? SanitizerKind::ID##Group : SanitizerMask())

Definition at line 49 of file Sanitizers.cpp.

◆ SANITIZER_GROUP [3/4]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)
Value:
.StartsWith(NAME "=", \
AllowGroups ? SanitizerKind::ID##Group : SanitizerMask())

Definition at line 49 of file Sanitizers.cpp.

◆ SANITIZER_GROUP [4/4]

#define SANITIZER_GROUP (   NAME,
  ID,
  ALIAS 
)
Value:
if (Kinds & SanitizerKind::ID##Group) \
Kinds |= SanitizerKind::ID;

Definition at line 49 of file Sanitizers.cpp.

Variable Documentation

◆ SanitizerMaskCutoffsEps

const double SanitizerMaskCutoffsEps = 0.000000001f
static