clang 8.0.0

SanitizerBlacklist.h
Go to the documentation of this file.
1 //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // User-provided blacklist used to disable/alter instrumentation done in
11 // sanitizers.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
15 #define LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
16
17 #include "clang/Basic/LLVM.h"
18 #include "clang/Basic/SanitizerSpecialCaseList.h"
19 #include "clang/Basic/Sanitizers.h"
20 #include "clang/Basic/SourceLocation.h"
21 #include "clang/Basic/SourceManager.h"
22 #include "llvm/ADT/StringRef.h"
23 #include <memory>
24
25 namespace clang {
26
27 class SanitizerBlacklist {
28 std::unique_ptr<SanitizerSpecialCaseList> SSCL;
29 SourceManager &SM;
30
31 public:
32 SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
33 SourceManager &SM);
34 bool isBlacklistedGlobal(SanitizerMask Mask, StringRef GlobalName,
35 StringRef Category = StringRef()) const;
36 bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName,
37 StringRef Category = StringRef()) const;
38 bool isBlacklistedFunction(SanitizerMask Mask, StringRef FunctionName) const;
39 bool isBlacklistedFile(SanitizerMask Mask, StringRef FileName,
40 StringRef Category = StringRef()) const;
41 bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc,
42 StringRef Category = StringRef()) const;
43 };
44
45 } // end namespace clang
46
47 #endif
SanitizerSpecialCaseList.h
clang::SanitizerBlacklist::isBlacklistedType
bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName, StringRef Category=StringRef()) const
Definition: SanitizerBlacklist.cpp:28
SourceManager.h
Defines the SourceManager interface.
clang::SanitizerBlacklist::isBlacklistedLocation
bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc, StringRef Category=StringRef()) const
Definition: SanitizerBlacklist.cpp:45
Sanitizers.h
Defines the clang::SanitizerKind enum.
Category
int Category
Definition: Format.cpp:1632
LLVM.h
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
clang::SanitizerBlacklist::isBlacklistedFile
bool isBlacklistedFile(SanitizerMask Mask, StringRef FileName, StringRef Category=StringRef()) const
Definition: SanitizerBlacklist.cpp:39
clang::SanitizerBlacklist::isBlacklistedFunction
bool isBlacklistedFunction(SanitizerMask Mask, StringRef FunctionName) const
Definition: SanitizerBlacklist.cpp:34
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::SanitizerMask
uint64_t SanitizerMask
Definition: Sanitizers.h:26
clang::SanitizerBlacklist::isBlacklistedGlobal
bool isBlacklistedGlobal(SanitizerMask Mask, StringRef GlobalName, StringRef Category=StringRef()) const
Definition: SanitizerBlacklist.cpp:22
clang::SanitizerBlacklist
Definition: SanitizerBlacklist.h:27
SourceLocation.h
Defines the clang::SourceLocation class and associated facilities.
clang::SanitizerBlacklist::SanitizerBlacklist
SanitizerBlacklist(const std::vector< std::string > &BlacklistPaths, SourceManager &SM)
Definition: SanitizerBlacklist.cpp:18
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:582