clang 22.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 LiveOriginsAnalysis &LiveOrigins,
30 const FactManager &FactMgr, AnalysisDeclContext &ADC,
31 LifetimeSafetyReporter *Reporter);
32
33} // namespace clang::lifetimes::internal
34
35#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_CHECKER_H
AnalysisDeclContext contains the context data for the function, method or block under analysis.
void runLifetimeChecker(const LoanPropagationAnalysis &LoanPropagation, const LiveOriginsAnalysis &LiveOrigins, const FactManager &FactMgr, AnalysisDeclContext &ADC, LifetimeSafetyReporter *Reporter)
Runs the lifetime checker, which detects use-after-free errors by examining loan expiration points an...
Definition Checker.cpp:122