clang 24.0.0git
LifetimeModeling.h
Go to the documentation of this file.
1#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_LIFETIMEMODELING_H
2#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_LIFETIMEMODELING_H
3
7#include <vector>
8
10/// Returns the set of lifetime sources bound to \p Source that are dangling
11/// stack regions.
12std::vector<const MemRegion *>
15
16/// Returns true if the underlying MemRegion is deallocated.
17bool isDeallocated(ProgramStateRef State, const MemRegion *Region);
18
19/// Returns the descriptive name of the memory region or a placeholder if a
20/// descriptive name cannot be constructed for it.
21std::string getRegionName(const MemRegion *Reg);
22} // namespace clang::ento::lifetime_modeling
23
24#endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_LIFETIMEMODELING_H
MemRegion - The root abstract class for all memory regions.
Definition MemRegion.h:97
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
Definition SVals.h:57
std::string getRegionName(const MemRegion *Reg)
Returns the descriptive name of the memory region or a placeholder if a descriptive name cannot be co...
bool isDeallocated(ProgramStateRef State, const MemRegion *Region)
Returns true if the underlying MemRegion is deallocated.
std::vector< const MemRegion * > getDanglingRegionsAfterReturn(SVal Source, ProgramStateRef State, CheckerContext &C)
Returns the set of lifetime sources bound to Source that are dangling stack regions.
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef