clang 19.0.0git
NoSanitizeList.h
Go to the documentation of this file.
1//===--- NoSanitizeList.h - List of ignored entities for sanitizers --*- C++
2//-*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9//
10// User-provided list of ignored entities used to disable/alter
11// instrumentation done in sanitizers.
12//
13//===----------------------------------------------------------------------===//
14#ifndef LLVM_CLANG_BASIC_NOSANITIZELIST_H
15#define LLVM_CLANG_BASIC_NOSANITIZELIST_H
16
17#include "clang/Basic/LLVM.h"
19#include "llvm/ADT/StringRef.h"
20#include <memory>
21#include <vector>
22
23namespace clang {
24
25class SanitizerMask;
26class SourceManager;
27class SanitizerSpecialCaseList;
28
30 std::unique_ptr<SanitizerSpecialCaseList> SSCL;
31 SourceManager &SM;
32
33public:
34 NoSanitizeList(const std::vector<std::string> &NoSanitizeListPaths,
37 bool containsGlobal(SanitizerMask Mask, StringRef GlobalName,
38 StringRef Category = StringRef()) const;
39 bool containsType(SanitizerMask Mask, StringRef MangledTypeName,
40 StringRef Category = StringRef()) const;
41 bool containsFunction(SanitizerMask Mask, StringRef FunctionName) const;
42 bool containsFile(SanitizerMask Mask, StringRef FileName,
43 StringRef Category = StringRef()) const;
44 bool containsMainFile(SanitizerMask Mask, StringRef FileName,
45 StringRef Category = StringRef()) const;
47 StringRef Category = StringRef()) const;
48};
49
50} // end namespace clang
51
52#endif
#define SM(sm)
Definition: Cuda.cpp:84
int Category
Definition: Format.cpp:2979
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
SourceLocation Loc
Definition: SemaObjC.cpp:758
Defines the clang::SourceLocation class and associated facilities.
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.
This class handles loading and caching of source files into memory.
The JSON file list parser is used to communicate input to InstallAPI.