clang 23.0.0git
Checker.h
Go to the documentation of this file.
1//===- Checker.h - C++ Lifetime Safety Analysis -*----------- 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// This file defines and enforces the lifetime safety policy. It detects
10// use-after-free errors by examining loan expiration points and checking if
11// any live origins hold the expired loans.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_CHECKER_H
16#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_CHECKER_H
17
22
24
25/// Runs the lifetime checker, which detects use-after-free errors by
26/// examining loan expiration points and checking if any live origins hold
27/// the expired loan.
28void runLifetimeChecker(const LoanPropagationAnalysis &LoanPropagation,
29 const MovedLoansAnalysis &MovedLoans,
30 const LiveOriginsAnalysis &LiveOrigins,
31 FactManager &FactMgr, AnalysisDeclContext &ADC,
32 LifetimeSafetySemaHelper *SemaHelper);
33
34} // namespace clang::lifetimes::internal
35
36#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_CHECKER_H
AnalysisDeclContext contains the context data for the function, method or block under analysis.
Abstract interface for operations requiring Sema access.
void runLifetimeChecker(const LoanPropagationAnalysis &LoanPropagation, const MovedLoansAnalysis &MovedLoans, const LiveOriginsAnalysis &LiveOrigins, FactManager &FactMgr, AnalysisDeclContext &ADC, LifetimeSafetySemaHelper *SemaHelper)
Runs the lifetime checker, which detects use-after-free errors by examining loan expiration points an...
Definition Checker.cpp:373