clang
20.0.0git
lib
Sema
CheckExprLifetime.h
Go to the documentation of this file.
1
//===- CheckExprLifetime.h ----------------------------------- -*- 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
// This files implements a statement-local lifetime analysis.
9
//
10
//===----------------------------------------------------------------------===//
11
12
#ifndef LLVM_CLANG_SEMA_CHECK_EXPR_LIFETIME_H
13
#define LLVM_CLANG_SEMA_CHECK_EXPR_LIFETIME_H
14
15
#include "
clang/AST/Expr.h
"
16
#include "
clang/Sema/Initialization.h
"
17
#include "
clang/Sema/Sema.h
"
18
19
namespace
clang::sema
{
20
21
/// Describes an entity that is being assigned.
22
struct
AssignedEntity
{
23
// The left-hand side expression of the assignment.
24
Expr
*
LHS
=
nullptr
;
25
};
26
27
/// Check that the lifetime of the given expr (and its subobjects) is
28
/// sufficient for initializing the entity, and perform lifetime extension
29
/// (when permitted) if not.
30
void
checkExprLifetime
(
Sema
&SemaRef,
const
InitializedEntity
&Entity,
31
Expr
*
Init
);
32
33
/// Check that the lifetime of the given expr (and its subobjects) is
34
/// sufficient for assigning to the entity.
35
void
checkExprLifetime
(
Sema
&SemaRef,
const
AssignedEntity
&Entity,
Expr
*
Init
);
36
37
}
// namespace clang::sema
38
39
#endif
// LLVM_CLANG_SEMA_CHECK_EXPR_LIFETIME_H
Expr.h
Initialization.h
Sema.h
clang::Expr
This represents one expression.
Definition:
Expr.h:110
clang::InitializedEntity
Describes an entity that is being initialized.
Definition:
Initialization.h:47
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition:
Sema.h:493
clang::sema
Definition:
AnalysisBasedWarnings.h:26
clang::sema::checkExprLifetime
void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, Expr *Init)
Check that the lifetime of the given expr (and its subobjects) is sufficient for initializing the ent...
Definition:
CheckExprLifetime.cpp:1302
clang::OpenACCDirectiveKind::Init
@ Init
clang::sema::AssignedEntity
Describes an entity that is being assigned.
Definition:
CheckExprLifetime.h:22
clang::sema::AssignedEntity::LHS
Expr * LHS
Definition:
CheckExprLifetime.h:24
Generated on Fri Nov 22 2024 09:49:38 for clang by
1.9.6