Skip to content

Commit a78bd02

Browse files
committed
add licence for the new files
1 parent 7f47282 commit a78bd02

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

clang/include/clang/Analysis/Analyses/LifetimeSafety.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
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+
//===----------------------------------------------------------------------===//
118
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
219
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
320
#include "clang/AST/DeclBase.h"

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
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+
//===----------------------------------------------------------------------===//
18
#include "clang/Analysis/Analyses/LifetimeSafety.h"
29
#include "clang/AST/Decl.h"
310
#include "clang/AST/Expr.h"
411
#include "clang/AST/StmtVisitor.h"
512
#include "clang/AST/Type.h"
13+
#include "clang/Analysis/Analyses/PostOrderCFGView.h"
614
#include "clang/Analysis/AnalysisDeclContext.h"
715
#include "clang/Analysis/CFG.h"
8-
#include "clang/Analysis/FlowSensitive/DataflowWorklist.h"
916
#include "llvm/ADT/FoldingSet.h"
10-
#include "llvm/ADT/ImmutableMap.h"
11-
#include "llvm/ADT/ImmutableSet.h"
1217
#include "llvm/ADT/PointerUnion.h"
1318
#include "llvm/ADT/SmallVector.h"
1419
#include "llvm/Support/Debug.h"

0 commit comments

Comments
 (0)