Path: blob/main/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/AllocationState.h
35266 views
//===--- AllocationState.h ------------------------------------- *- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H9#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H1011#include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h"12#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"1314namespace clang {15namespace ento {1617namespace allocation_state {1819ProgramStateRef markReleased(ProgramStateRef State, SymbolRef Sym,20const Expr *Origin);2122/// This function provides an additional visitor that augments the bug report23/// with information relevant to memory errors caused by the misuse of24/// AF_InnerBuffer symbols.25std::unique_ptr<BugReporterVisitor> getInnerPointerBRVisitor(SymbolRef Sym);2627/// 'Sym' represents a pointer to the inner buffer of a container object.28/// This function looks up the memory region of that object in29/// DanglingInternalBufferChecker's program state map.30const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym);3132} // end namespace allocation_state3334} // end namespace ento35} // end namespace clang3637#endif383940