brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 25de370 Raw
39 lines · c
1//===--- AllocationState.h ------------------------------------- *- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H10#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H11 12#include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h"13#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"14 15namespace clang {16namespace ento {17 18namespace allocation_state {19 20ProgramStateRef markReleased(ProgramStateRef State, SymbolRef Sym,21                             const Expr *Origin);22 23/// This function provides an additional visitor that augments the bug report24/// with information relevant to memory errors caused by the misuse of25/// AF_InnerBuffer symbols.26std::unique_ptr<BugReporterVisitor> getInnerPointerBRVisitor(SymbolRef Sym);27 28/// 'Sym' represents a pointer to the inner buffer of a container object.29/// This function looks up the memory region of that object in30/// DanglingInternalBufferChecker's program state map.31const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym);32 33} // end namespace allocation_state34 35} // end namespace ento36} // end namespace clang37 38#endif39