clang  11.0.0git
SanitizerBlacklist.h
Go to the documentation of this file.
1 //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // User-provided blacklist used to disable/alter instrumentation done in
10 // sanitizers.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
14 #define LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
15 
16 #include "clang/Basic/LLVM.h"
18 #include "llvm/ADT/StringRef.h"
19 #include <memory>
20 #include <vector>
21 
22 namespace clang {
23 
24 class SanitizerMask;
25 class SourceManager;
26 class SanitizerSpecialCaseList;
27 
29  std::unique_ptr<SanitizerSpecialCaseList> SSCL;
30  SourceManager &SM;
31 
32 public:
33  SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
34  SourceManager &SM);
36  bool isBlacklistedGlobal(SanitizerMask Mask, StringRef GlobalName,
37  StringRef Category = StringRef()) const;
38  bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName,
39  StringRef Category = StringRef()) const;
40  bool isBlacklistedFunction(SanitizerMask Mask, StringRef FunctionName) const;
41  bool isBlacklistedFile(SanitizerMask Mask, StringRef FileName,
42  StringRef Category = StringRef()) const;
44  StringRef Category = StringRef()) const;
45 };
46 
47 } // end namespace clang
48 
49 #endif
bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName, StringRef Category=StringRef()) const
bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc, StringRef Category=StringRef()) const
int Category
Definition: Format.cpp:2021
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.
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.