25 NoSanitizePaths, SM.getFileManager().getVirtualFileSystem())),
30bool NoSanitizeList::containsPrefix(
SanitizerMask Mask, StringRef Prefix,
31 StringRef Name, StringRef Category)
const {
32 std::pair<unsigned, unsigned> NoSan =
33 SSCL->inSectionBlame(Mask, Prefix, Name, Category);
34 if (NoSan == llvm::SpecialCaseList::NotFound)
36 std::pair<unsigned, unsigned> San =
37 SSCL->inSectionBlame(Mask, Prefix, Name,
"sanitize");
42 return San == llvm::SpecialCaseList::NotFound || NoSan > San;
46 StringRef Category)
const {
47 return containsPrefix(Mask,
"global", GlobalName, Category);
51 StringRef Category)
const {
52 return containsPrefix(Mask,
"type", MangledTypeName, Category);
56 StringRef FunctionName)
const {
57 return containsPrefix(Mask,
"fun", FunctionName, {});
61 StringRef Category)
const {
62 return containsPrefix(Mask,
"src",
FileName, Category);
66 StringRef Category)
const {
67 return containsPrefix(Mask,
"mainfile",
FileName, Category);
71 StringRef Category)
const {
73 containsFile(Mask, SM.getFilename(SM.getFileLoc(Loc)), Category);
Defines the clang::FileManager interface and associated types.
Defines the clang::SanitizerKind enum.
Defines the SourceManager interface.
NoSanitizeList(const std::vector< std::string > &NoSanitizeListPaths, SourceManager &SM)
bool containsType(SanitizerMask Mask, StringRef MangledTypeName, StringRef Category=StringRef()) const
bool containsGlobal(SanitizerMask Mask, StringRef GlobalName, StringRef Category=StringRef()) const
bool containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category=StringRef()) const
bool containsLocation(SanitizerMask Mask, SourceLocation Loc, StringRef Category=StringRef()) const
bool containsMainFile(SanitizerMask Mask, StringRef FileName, StringRef Category=StringRef()) const
bool containsFunction(SanitizerMask Mask, StringRef FunctionName) const
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
This class handles loading and caching of source files into memory.
The JSON file list parser is used to communicate input to InstallAPI.