clang: include/clang/AST/ASTLambda.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_CLANG_AST_ASTLAMBDA_H
16#define LLVM_CLANG_AST_ASTLAMBDA_H
17
20#include "llvm/Support/Casting.h"
21
24 return "__invoke";
25}
26
27
30 if (!LambdaClass || !LambdaClass->isLambda()) return false;
32}
33
38
40 if (const auto *MD = dyn_cast_if_present(DC))
41 return MD->getParent()->isLambda();
42 return false;
43}
44
49
59
61 if (!MD) return false;
66 return false;
67}
68
70 return C ? C->getParent()->isLambda() : false;
71}
72
74 if (!D) return false;
79 dyn_cast_or_null(F->getTemplatedDecl()))
81 return false;
82}
83
86 dyn_cast(DC));
87}
88
91 const auto *MD = dyn_cast(DC);
92 if (!MD) return false;
96 MD->isFunctionTemplateSpecialization();
97 return false;
98}
99
100
101
108
109}
110
111#endif
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Represents a C++ conversion function within a class.
Represents a static or instance method of a struct/union/class.
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined.
Represents a C++ struct/union/class.
bool isGenericLambda() const
Determine whether this class describes a generic lambda function object (i.e.
bool isLambda() const
Determine whether this class describes a lambda function object.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Decl - This represents one declaration (or definition), e.g.
bool isFunctionTemplateSpecialization() const
Determine whether this function is a function template specialization.
OverloadedOperatorKind getOverloadedOperator() const
getOverloadedOperator - Which C++ overloaded operator this function represents, if any.
Declaration of a template function.
The JSON file list parser is used to communicate input to InstallAPI.
bool isLambdaCallWithImplicitObjectParameter(const DeclContext *DC)
Definition ASTLambda.h:50
bool isa(CodeGen::Address addr)
DeclContext * getLambdaAwareParentOfDeclContext(DeclContext *DC)
Definition ASTLambda.h:102
bool isLambdaCallWithExplicitObjectParameter(const DeclContext *DC)
Definition ASTLambda.h:45
bool isGenericLambdaCallOperatorOrStaticInvokerSpecialization(const DeclContext *DC)
Definition ASTLambda.h:89
bool isLambdaCallOperator(const CXXMethodDecl *MD)
Definition ASTLambda.h:28
bool isLambdaConversionOperator(CXXConversionDecl *C)
Definition ASTLambda.h:69
StringRef getLambdaStaticInvokerName()
Definition ASTLambda.h:23
U cast(CodeGen::Address addr)
bool isLambdaMethod(const DeclContext *DC)
Definition ASTLambda.h:39
bool isGenericLambdaCallOperatorSpecialization(const CXXMethodDecl *MD)
Definition ASTLambda.h:60