[DFAJumpThreading] Remove incoming StartBlock from all phis when unfolding select...
[llvm-project.git] / clang / lib / StaticAnalyzer / Checkers / AllocationState.h
blob25de3700331908600686eb33d1b8e38b92592f34
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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H
10 #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H
12 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h"
13 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
15 namespace clang {
16 namespace ento {
18 namespace allocation_state {
20 ProgramStateRef markReleased(ProgramStateRef State, SymbolRef Sym,
21 const Expr *Origin);
23 /// This function provides an additional visitor that augments the bug report
24 /// with information relevant to memory errors caused by the misuse of
25 /// AF_InnerBuffer symbols.
26 std::unique_ptr<BugReporterVisitor> getInnerPointerBRVisitor(SymbolRef Sym);
28 /// 'Sym' represents a pointer to the inner buffer of a container object.
29 /// This function looks up the memory region of that object in
30 /// DanglingInternalBufferChecker's program state map.
31 const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym);
33 } // end namespace allocation_state
35 } // end namespace ento
36 } // end namespace clang
38 #endif