File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
include/clang/Analysis/Analyses Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change
1
+ // ===- LifetimeSafety.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 the entry point for a dataflow-based static analysis
10
+ // that checks for C++ lifetime violations.
11
+ //
12
+ // The analysis is based on the concepts of "origins" and "loans" to track
13
+ // pointer lifetimes and detect issues like use-after-free and dangling
14
+ // pointers. See the RFC for more details:
15
+ // https://discourse.llvm.org/t/rfc-intra-procedural-lifetime-analysis-in-clang/86291
16
+ //
17
+ // ===----------------------------------------------------------------------===//
1
18
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
2
19
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
3
20
#include " clang/AST/DeclBase.h"
Original file line number Diff line number Diff line change
1
+ // ===- LifetimeSafety.cpp - 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
+ // ===----------------------------------------------------------------------===//
1
8
#include " clang/Analysis/Analyses/LifetimeSafety.h"
2
9
#include " clang/AST/Decl.h"
3
10
#include " clang/AST/Expr.h"
4
11
#include " clang/AST/StmtVisitor.h"
5
12
#include " clang/AST/Type.h"
13
+ #include " clang/Analysis/Analyses/PostOrderCFGView.h"
6
14
#include " clang/Analysis/AnalysisDeclContext.h"
7
15
#include " clang/Analysis/CFG.h"
8
- #include " clang/Analysis/FlowSensitive/DataflowWorklist.h"
9
16
#include " llvm/ADT/FoldingSet.h"
10
- #include " llvm/ADT/ImmutableMap.h"
11
- #include " llvm/ADT/ImmutableSet.h"
12
17
#include " llvm/ADT/PointerUnion.h"
13
18
#include " llvm/ADT/SmallVector.h"
14
19
#include " llvm/Support/Debug.h"
You can’t perform that action at this time.
0 commit comments