Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:50

0001 //===--- NoSanitizeList.h - List of ignored entities for sanitizers --*- C++
0002 //-*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 //
0010 // User-provided list of ignored entities used to disable/alter
0011 // instrumentation done in sanitizers.
0012 //
0013 //===----------------------------------------------------------------------===//
0014 #ifndef LLVM_CLANG_BASIC_NOSANITIZELIST_H
0015 #define LLVM_CLANG_BASIC_NOSANITIZELIST_H
0016 
0017 #include "clang/Basic/LLVM.h"
0018 #include "clang/Basic/SourceLocation.h"
0019 #include "llvm/ADT/StringRef.h"
0020 #include <memory>
0021 #include <vector>
0022 
0023 namespace clang {
0024 
0025 class SanitizerMask;
0026 class SourceManager;
0027 class SanitizerSpecialCaseList;
0028 
0029 class NoSanitizeList {
0030   std::unique_ptr<SanitizerSpecialCaseList> SSCL;
0031   SourceManager &SM;
0032 
0033 public:
0034   NoSanitizeList(const std::vector<std::string> &NoSanitizeListPaths,
0035                  SourceManager &SM);
0036   ~NoSanitizeList();
0037   bool containsGlobal(SanitizerMask Mask, StringRef GlobalName,
0038                       StringRef Category = StringRef()) const;
0039   bool containsType(SanitizerMask Mask, StringRef MangledTypeName,
0040                     StringRef Category = StringRef()) const;
0041   bool containsFunction(SanitizerMask Mask, StringRef FunctionName) const;
0042   bool containsFile(SanitizerMask Mask, StringRef FileName,
0043                     StringRef Category = StringRef()) const;
0044   bool containsMainFile(SanitizerMask Mask, StringRef FileName,
0045                         StringRef Category = StringRef()) const;
0046   bool containsLocation(SanitizerMask Mask, SourceLocation Loc,
0047                         StringRef Category = StringRef()) const;
0048 };
0049 
0050 } // end namespace clang
0051 
0052 #endif