Thanks to visit codestin.com
Credit goes to clang.llvm.org

clang 22.0.0git
LifetimeAnnotations.h
Go to the documentation of this file.
1//===- LifetimeAnnotations.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// Helper functions to inspect and infer lifetime annotations.
9//===----------------------------------------------------------------------===//
10#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMEANNOTATIONS_H
11#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMEANNOTATIONS_H
12
13#include "clang/AST/DeclCXX.h"
14
15namespace clang {
16namespace lifetimes {
17
18/// Returns the most recent declaration of the method to ensure all
19/// lifetime-bound attributes from redeclarations are considered.
21
22/// Returns the most recent declaration of the method to ensure all
23/// lifetime-bound attributes from redeclarations are considered.
24const CXXMethodDecl *
26
27// Return true if this is an "normal" assignment operator.
28// We assume that a normal assignment operator always returns *this, that is,
29// an lvalue reference that is the same type as the implicit object parameter
30// (or the LHS for a non-member operator==).
32
33/// Returns true if this is an assignment operator where the parameter
34/// has the lifetimebound attribute.
36
37/// Returns true if the implicit object parameter (this) should be considered
38/// lifetimebound, either due to an explicit lifetimebound attribute on the
39/// method or because it's a normal assignment operator.
41} // namespace lifetimes
42} // namespace clang
43
44#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMEANNOTATIONS_H
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Represents a static or instance method of a struct/union/class.
Definition DeclCXX.h:2129
Represents a function declaration or definition.
Definition Decl.h:1999
bool isAssignmentOperatorLifetimeBound(const CXXMethodDecl *CMD)
Returns true if this is an assignment operator where the parameter has the lifetimebound attribute.
bool isNormalAssignmentOperator(const FunctionDecl *FD)
bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD)
Returns true if the implicit object parameter (this) should be considered lifetimebound,...
const FunctionDecl * getDeclWithMergedLifetimeBoundAttrs(const FunctionDecl *FD)
Returns the most recent declaration of the method to ensure all lifetime-bound attributes from redecl...
The JSON file list parser is used to communicate input to InstallAPI.