clang  6.0.0svn
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"
19 #include "clang/Basic/Sanitizers.h"
22 #include "llvm/ADT/StringRef.h"
23 #include <memory>
24 
25 namespace clang {
26 
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;
42  StringRef Category = StringRef()) const;
43 };
44 
45 } // end namespace clang
46 
47 #endif
bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName, StringRef Category=StringRef()) const
Defines the SourceManager interface.
bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc, StringRef Category=StringRef()) const
Defines the clang::SanitizerKind enum.
int Category
Definition: Format.cpp:1348
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
bool isBlacklistedFile(SanitizerMask Mask, StringRef FileName, StringRef Category=StringRef()) const
bool isBlacklistedFunction(SanitizerMask Mask, StringRef FunctionName) const
Encodes a location in the source.
Dataflow Directional Tag Classes.
uint64_t SanitizerMask
Definition: Sanitizers.h:24
bool isBlacklistedGlobal(SanitizerMask Mask, StringRef GlobalName, StringRef Category=StringRef()) const
Defines the clang::SourceLocation class and associated facilities.
SanitizerBlacklist(const std::vector< std::string > &BlacklistPaths, SourceManager &SM)
This class handles loading and caching of source files into memory.