1 //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // User-provided blacklist used to disable/alter instrumentation done in
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
14 #define LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
16 #include "clang/Basic/LLVM.h"
17 #include "clang/Basic/SourceLocation.h"
18 #include "llvm/ADT/StringRef.h"
26 class SanitizerSpecialCaseList;
28 class SanitizerBlacklist {
29 std::unique_ptr<SanitizerSpecialCaseList> SSCL;
33 SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
35 ~SanitizerBlacklist();
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;
43 bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc,
44 StringRef Category = StringRef()) const;
47 } // end namespace clang