1 //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // User-provided blacklist used to disable/alter instrumentation done in
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
15 #define LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H
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"
27 class SanitizerBlacklist {
28 std::unique_ptr<SanitizerSpecialCaseList> SSCL;
32 SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
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;
45 } // end namespace clang