Skip to content

Commit 136238f

Browse files
committed
Introduce Intra-procedural lifetime analysis in Clang
1 parent 95335fe commit 136238f

File tree

6 files changed

+1184
-0
lines changed

6 files changed

+1184
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIME_SAFETY_H
2+
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIME_SAFETY_H
3+
#include "clang/AST/DeclBase.h"
4+
#include "clang/Analysis/AnalysisDeclContext.h"
5+
#include "clang/Analysis/CFG.h"
6+
namespace clang {
7+
8+
void runLifetimeAnalysis(const DeclContext &dc, const CFG &cfg,
9+
AnalysisDeclContext &ac);
10+
11+
} // namespace clang
12+
13+
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIME_SAFETY_H

clang/lib/Analysis/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ add_clang_library(clangAnalysis
2121
FixitUtil.cpp
2222
IntervalPartition.cpp
2323
IssueHash.cpp
24+
LifetimeSafety.cpp
2425
LiveVariables.cpp
2526
MacroExpansionContext.cpp
2627
ObjCNoReturn.cpp

0 commit comments

Comments
 (0)