clang  3.9.0
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"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/SpecialCaseList.h"
22 #include <memory>
23 
24 namespace clang {
25 
27  std::unique_ptr<llvm::SpecialCaseList> SCL;
28  SourceManager &SM;
29 
30 public:
31  SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
32  SourceManager &SM);
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;
41  StringRef Category = StringRef()) const;
42 };
43 
44 } // end namespace clang
45 
46 #endif
Defines the SourceManager interface.
bool isBlacklistedFile(StringRef FileName, StringRef Category=StringRef()) const
int Category
Definition: Format.cpp:1197
bool isBlacklistedLocation(SourceLocation Loc, StringRef Category=StringRef()) const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
StringRef FileName
Definition: Format.cpp:1313
Encodes a location in the source.
bool isBlacklistedType(StringRef MangledTypeName, StringRef Category=StringRef()) const
bool isBlacklistedGlobal(StringRef GlobalName, StringRef Category=StringRef()) const
bool isBlacklistedFunction(StringRef FunctionName) 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.