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/SourceLocation.h"
19 #include "clang/Basic/SourceManager.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/SpecialCaseList.h"
26 class SanitizerBlacklist {
27 std::unique_ptr<llvm::SpecialCaseList> SCL;
31 SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
33 bool isBlacklistedGlobal(StringRef GlobalName,
34 StringRef Category = StringRef()) const;
35 bool isBlacklistedType(StringRef MangledTypeName,
36 StringRef Category = StringRef()) const;
37 bool isBlacklistedFunction(StringRef FunctionName) const;
38 bool isBlacklistedFile(StringRef FileName,
39 StringRef Category = StringRef()) const;
40 bool isBlacklistedLocation(SourceLocation Loc,
41 StringRef Category = StringRef()) const;
44 } // end namespace clang