clang  14.0.0git
AllocationState.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H
10 #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ALLOCATIONSTATE_H
11 
14 
15 namespace clang {
16 namespace ento {
17 
18 namespace allocation_state {
19 
21  const Expr *Origin);
22 
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);
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 in
30 /// DanglingInternalBufferChecker's program state map.
32 
33 } // end namespace allocation_state
34 
35 } // end namespace ento
36 } // end namespace clang
37 
38 #endif
clang::ento::MemRegion
MemRegion - The root abstract class for all memory regions.
Definition: MemRegion.h:94
clang::ento::SymExpr
Symbolic value.
Definition: SymExpr.h:29
clang::ento::allocation_state::getInnerPointerBRVisitor
std::unique_ptr< BugReporterVisitor > getInnerPointerBRVisitor(SymbolRef Sym)
This function provides an additional visitor that augments the bug report with information relevant t...
Definition: InnerPointerChecker.cpp:291
BugReporterVisitors.h
State
LineState State
Definition: UnwrappedLineFormatter.cpp:986
clang::ento::allocation_state::getContainerObjRegion
const MemRegion * getContainerObjRegion(ProgramStateRef State, SymbolRef Sym)
'Sym' represents a pointer to the inner buffer of a container object.
Definition: InnerPointerChecker.cpp:295
ProgramState.h
clang
Definition: CalledOnceCheck.h:17
clang::ento::allocation_state::markReleased
ProgramStateRef markReleased(ProgramStateRef State, SymbolRef Sym, const Expr *Origin)
Definition: MallocChecker.cpp:3545
clang::Expr
This represents one expression.
Definition: Expr.h:109
llvm::IntrusiveRefCntPtr
Definition: LLVM.h:47